Skip to content
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,16 @@ protected SCMRevision retrieve(SCMHead head, TaskListener listener)
}
PullRequestSCMRevision prRev =
createPullRequestSCMRevision(pr, prhead, listener, ghRepository);
prRev.validateMergeHash();
try {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only need to do this if the prHead is a merge, right?
Maybe encapsulate this in a method and call from the two different places we currently call validateMergeHash()?
getValidatedMergeOrNull()?

prRev.validateMergeHash();
} catch (AbortException e) {
listener
.getLogger()
.format(
"Resolved %s as unmergable pull request %d: %s.%n",
prhead.getName(), prhead.getNumber(), prRev.getPullHash());
return null;
}
return prRev;
} else if (head instanceof GitHubTagSCMHead) {
GitHubTagSCMHead tagHead = (GitHubTagSCMHead) head;
Expand Down