Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51867

Get branch name for PR in a better way

XMLWordPrintable

      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

            gautamabhishek46 Abhishek Gautam
            gautamabhishek46 Abhishek Gautam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: