Skip to content

Commit

Permalink
Use Server eventKey for Server Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan committed Nov 22, 2024
1 parent c5915fa commit 110dbc1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import java.util.List;
import java.util.logging.Logger;

import static io.jenkins.plugins.bitbucketpushandpullrequest.common.BitBucketPPRConst.PULL_REQUEST_MERGED;
import static io.jenkins.plugins.bitbucketpushandpullrequest.common.BitBucketPPRConst.PULL_REQUEST_SERVER_MERGED;
import static java.util.Objects.isNull;
import static org.apache.commons.lang3.ObjectUtils.isEmpty;

Expand Down Expand Up @@ -220,7 +220,7 @@ public String getLinkDecline() throws MalformedURLException {

@Override
public String getLatestCommit() {
if (PULL_REQUEST_MERGED.equalsIgnoreCase(this.bitbucketEvent.getAction())) {
if (PULL_REQUEST_SERVER_MERGED.equalsIgnoreCase(this.bitbucketEvent.getAction())) {

Check warning on line 223 in src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/action/BitBucketPPRPullRequestServerAction.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 223 is only partially covered, one branch is missing
return payload.getPullRequest().getMergeCommit().getHash();
}
return payload.getServerPullRequest().getFromRef().getLatestCommit();
Expand Down

0 comments on commit 110dbc1

Please sign in to comment.