Skip to content

Commit

Permalink
Merge pull request #128 from stephenc/jenkins-41616
Browse files Browse the repository at this point in the history
[FIXED JENKINS-41616] Non-trusted pull requests should use a probe against the trusted revision not the PR's revision
  • Loading branch information
stephenc authored Mar 16, 2017
2 parents 56aca14 + 8272f20 commit f4403ae
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ private void doRetrieve(SCMSourceCriteria criteria, SCMHeadObserver observer, Ta
// but this would be a lot more work, and is unlikely to differ from using refs/pull/123/merge:

Connector.checkApiRateLimit(listener, github);
try (SCMProbe probe = createProbe(head, null)) {
try (SCMProbe probe = createProbe(trusted ? head : head.getTarget(), null)) {
if (criteria.isHead(probe, listener)) {
// FYI https://developer.github.com/v3/pulls/#response-1
Boolean mergeable = ghPullRequest.getMergeable();
Expand Down

0 comments on commit f4403ae

Please sign in to comment.