Hi there! Is there any way to get the original feature branch name within a pipeline that was triggered by a PR build rather than the "PR-#" style BRANCH_NAME?
I've tried things like: scm checkout def branch = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() But that doesn't work because its actually on a detached head commit with no branch. Our Github Organization is currently configured to use: - Build origin branches - Build origin PRs (unmerged head) We also specify "Include branches" so that we only build the "master PR-*" branches. It seems like I could use "Build origin branches also filed as PRs" and get the correct BRANCH_NAME for free. But if I understand correctly, "Include branches" would become useless and I would no longer be able to configure it to build only the "master" branch and pull request branches. Anyone have any ideas how I might be able to make this work? Thanks! -Logan -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3135bfee-2501-4814-8555-af0c79551112%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
