From 110dbc11a14062bf189f0a035dc0e18f9c4f2fc5 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 21 Nov 2024 20:51:58 -0500 Subject: [PATCH] Use Server eventKey for Server Action --- .../action/BitBucketPPRPullRequestServerAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/action/BitBucketPPRPullRequestServerAction.java b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/action/BitBucketPPRPullRequestServerAction.java index f9659c3..e791937 100644 --- a/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/action/BitBucketPPRPullRequestServerAction.java +++ b/src/main/java/io/jenkins/plugins/bitbucketpushandpullrequest/action/BitBucketPPRPullRequestServerAction.java @@ -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; @@ -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())) { return payload.getPullRequest().getMergeCommit().getHash(); } return payload.getServerPullRequest().getFromRef().getLatestCommit();