# Git pull requests building and branch name

**URL:** <https://www.finalbuilder.com/forums/t/git-pull-requests-building-and-branch-name/5133>\
**Category:** Discussion\
**Created:** [December 24, 2013, 1:09am UTC](https://www.finalbuilder.com/forums/t/git-pull-requests-building-and-branch-name/5133 "2013-12-24T01:09:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)\
**Post date:** [December 24, 2013, 1:09am UTC](https://www.finalbuilder.com/forums/t/git-pull-requests-building-and-branch-name/5133/1 "2013-12-24T01:09:33Z")

</div>

Hello,

I am trying to get this to work for Catel:

[https://www.finalbuilder.com/Resourc...ua-ci.aspx](https://www.finalbuilder.com/Resources/Blogs/PostId/700/building-github-pull-requests-with-continua-ci.aspx)

Since I have a variable %BranchName% which contains the branch name (so I can easily clone configurations and only have to modify the branch name), I need to set it in the trigger (see [this post](https://www.finalbuilder.com/forums/t/defining-branch-names/5088) why I did it with variables).. How do I get the pull request branch name that caused the trigger?

---

<div class="post-metadata">

**Author:** ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)\
**Post date:** [December 24, 2013, 1:16am UTC](https://www.finalbuilder.com/forums/t/git-pull-requests-building-and-branch-name/5133/2 "2013-12-24T01:16:57Z")

</div>

Ok, I think the branchname is not required because I can share the same repository over all configurations (CI, Nightly, Production). Only have to find a way to make sure Production uses master.

---

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [January 2, 2014, 12:07pm UTC](https://www.finalbuilder.com/forums/t/git-pull-requests-building-and-branch-name/5133/3 "2014-01-02T12:07:52Z")

</div>

Hi Geerk,

You can get the display name of the branch being built using the expression_&nbsp;$Source.RepoName.BranchName$.&nbsp;_For some repository types this will be different to _&nbsp;$Source.RepoName.Branch$_ which is the Branch path.

---

<div class="post-metadata">

**Author:** ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)\
**Post date:** [January 5, 2014, 3:02am UTC](https://www.finalbuilder.com/forums/t/git-pull-requests-building-and-branch-name/5133/4 "2014-01-05T03:02:51Z")

</div>

Very nice. I have added this condition to the production builds:   
  
 ‘$Source.RepoName.Branch$’ Does not equal ‘master’   
  
 so I can never accidentally start a production build on the default (develop) branch.
