-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Jenkins v2.23, Bitbucket branch source plugin v1.8
This is a regression from v1.7. In v1.7 I could test whether PR is being built with 'env.BRANCH_NAME.startsWith("PR-")', and in v1.8 'env.BRANCH_NAME' is set to name of branch from which pull request originates. This is OK for me, but the I would expect 'env. CHANGE_ID' to be set to non-null and contain information about pull request number. However, in v1.8 CHANGE_ID is null even for pull requests, while BRANCH_NAME contains name of branch for both pull requests and branches.
How to detect from script whether PR or branch is being built? I want different build behaviour for PRs and feature branches.
- is related to
-
JENKINS-40486 Plugin does not adhere to documented global variables
- Open