I'm using Multibranch Pipeline Job in Jenkins.
How do I find the branch name from which the Pull Request is raised in GitHub?
I'm using /github-webhook/
& also tried with /ghprbhook/
and tried with the following environment variables: GIT_LOCAL_BRANCH
, GIT_BRANCH
, ghprbSourceBranch
, but I didn't get any result.
If there are any suggestions, I would love to try them.
CHANGE_BRANCH
gives the correct name of the source branch of the PR.
CHANGE_TARGET
gives the target name of the PR merge