Skip to content

Commit 27ad582

Browse files
534 | Multiple triggers of the same PR (#549)
Co-authored-by: Gleb Samsonov <[email protected]> Co-authored-by: Günter Grodotzki <[email protected]>
1 parent fbff35c commit 27ad582

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/main/java/com/cloudbees/jenkins/plugins/bitbucket/server/client/BitbucketServerAPIClient.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,14 @@ private List<BitbucketServerPullRequest> getPullRequests(UriTemplate template)
344344
setupPullRequest(pullRequest, endpoint);
345345
}
346346

347+
if (endpoint != null) {
348+
// Get PRs again as revisions could be changed by other events during setupPullRequest
349+
if (endpoint.isCallChanges() && BitbucketServerVersion.VERSION_7.equals(endpoint.getServerVersion())) {
350+
pullRequests = getResources(template, BitbucketServerPullRequests.class);
351+
pullRequests.removeIf(this::shouldIgnore);
352+
}
353+
}
354+
347355
return pullRequests;
348356
}
349357

0 commit comments

Comments
 (0)