I use the Jenkins GitHub pull builder plugin to run my unit tests when a tensile request is created using a web hook. For the build phase, I need to know the name of the branch that merges (for example, I need to develop the branch if it merges into the main branch). Is there a way to access this in the Jenkins runtime shell? Thank,
Your link has an answer:
Environment VariablesThe plugin provides very useful environment variables.ghprbActualCommitghprbActualCommitAuthorghprbActualCommitAuthorEmailghprbPullDescriptionghprbPullIdghprbPullLinkghprbPullTitleghprbSourceBranchghprbTargetBranchsha1
Environment Variables
The plugin provides very useful environment variables.
ghprbActualCommit
ghprbActualCommitAuthor
ghprbActualCommitAuthorEmail
ghprbPullDescription
ghprbPullId
ghprbPullLink
ghprbPullTitle
ghprbSourceBranch
ghprbTargetBranch
sha1
$ghprbSourceBranch, , - script.
$ghprbSourceBranch