-
Bug
-
Resolution: Unresolved
-
Critical
-
Jenkins LTS 2.121.2
Bitbucket Branch Source 2.2.12
The Bitbucket Branch Source Plugin is unable to build pull requests with a dedicated Bitbucket instance after upgrading to the latest version (2.2.12).
After some tests I was able to verify that broke this functionality was introduced in version 2.2.4 of the plugin.
As a workaround it is possible to revert the plugin to 2.2.3.
The issue is that the plugin tries to pull the branch "branch" by the incorrect branch name "PR-1". The variable scm.branches is also set to the same incorrect value.
After some search I think I pinpointed it to the following location in the current code:
https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/master/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMSource.java#L669
There was a discussion on the initial commit on the change:
https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/63/files
Kind regards