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

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

              Created:
              Updated:
              Resolved: