Getting Source Branch & Target Branch in Jenkins when PR is raised #52501
Replies: 1 comment
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
Dear All,
I have enabled Generic Webhook Trigger in Jenkins for triggering the build when PR is raised. The job is getting triggered successfully when PR is raised, but I have a requirement of merging cod temporarily onto targetBranch before running the job. For this, I have configured "Additional Behaviours" under Source Code Management module by choosing "Merge Before Build".
Here I need to provide $targetBranch for merging the code temporarily.
Can anyone confirm what needs to be done get $targetBranch from GitHub Payload when PR is raised?
The $sourceBranch & $targetBranch variables are getting returned from payload when PR is raised through bitbucket but not through github.
quick help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions