Fix JENKINS-40465#48
Fix JENKINS-40465#48zigarn wants to merge 1 commit intojenkinsci:masterfrom zigarn:fix-JENKINS-40465
Conversation
|
It's not really clean to test |
For Bitbucket Server, use only destination repository for repository-related actions
|
I thought this should be superseded by #53 . Didn't test this scenario though. |
|
AIUI this issue is resolved by the changes in JENKINS-43507, specifically which will be released in 2.2.0 |
|
Looks like it could. |
|
@zigarn any luck? |
|
I can confirm that using the tag |
|
It's nice with all the options for managing PR. Looking forward to see this released! |
|
@i386 @stephenc : I was too quick to give my GO... |
|
@zigarn, Bitbucket Server does not have this issue as we use the refs/pull-requests/N/head refspec (not without its own issues though, e.g. https://github.com/topicusfinan/bitbucket-webhooks-plugin/pull/51) Bitbucket Cloud will work for forks in the same account (which according to Bitbucket is the majority case) but will not work for private forks to your own account as there is NO WAY WHATSOEVER to access those forks without setting the permissions when you fork, see https://bitbucket.org/site/master/issues/5814/reify-pull-requests-by-making-them-a-ref and other issues there |
|
@stephenc : no problem with the refspec, but in the code I referenced, the list of branches is checked against the source repository which may not be accessible in case of private fork. |
|
@zigarn have you looked at the new 2.2.x code? |
|
@zigarn keep in mind that we protect against such inaccessible forks during scanning, so the only time you get to the referenced method is after a full scan has discovered, and we have a guard there: https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMSource.java#L722 |
|
@stephenc: In the code you're refering, When testing by launching a But, when building PR-2: |
|
@zigarn can you create a JIRA for this new issue |
|
JENKINS-45775. |
[JENKINS-37219] Add a job property for overriding branch index triggers
JENKINS-40465
For Bitbucket Server, use only destination repository for repository-related actions