Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get destination branch on pull request plan branch script

Jay Jackson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2018

Hi, is there a way to get the target/destination branch on a plan branch script that was created via a pull request. Basically, I want to know the target branch of the pull request from within the default job script task.

 

The idea would be to change behavior if this is a pull request to merge into "uat" vs. "master". 

1 answer

0 votes
Jay Jackson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2018

Figured this out by enabling merging on the Bamboo plan under branches. Then after that, new environment variables became available, one of which was ${bamboo.planRepository.integrationBranch.branchName} , which gave me the target/destination branch information I was looking for. Cheers! Screen Shot 2018-04-25 at 10.32.33 PM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events