Forums

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

pipelines - get the name of the target branch of pull request

Eyal Lapid
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!
October 31, 2018

Is there a way to get in a pipeline build, the name of the target branch?

I see there is a way to get the name of the branch that is building. But I did not see a way to get the name of the target branch.

My use case - we have a large project that we want to add a linter phase to it. But I want the linter to report linting erros only on changed files. I can do a git diff names only between to branches for this and send the result to the linter. But I need the name of the target branch for this.

1 answer

0 votes
Jeroen De Raedt
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2018

Hi @Eyal Lapid,

with the current branch pipelines that is not available. However, the upcoming pull request builds will have this information available as a branch variable. You can track to progress of this work here: https://bitbucket.org/site/master/issues/13438/add-specific-pipelines-configuration-for (should be released very soon) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events