-
Improvement
-
Resolution: Fixed
-
Minor
-
None
To get the branch name,property.getBranch().getName() but if the the build will correspond to a PR then property.getBranch().getName() gives PR-#PRnumber.
A better way is needed to get the branch name that will work for all git plugins, GitHubs, Bitbucket, Gitlab, etc.
Link of discussion https://github.com/jenkinsci/simple-pull-request-job-plugin/pull/7