Git pull requests building and branch name

Hello,

I am trying to get this to work for Catel:

https://www.finalbuilder.com/Resourc...ua-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 why I did it with variables).. How do I get the pull request branch name that caused the trigger?

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.

Hi Geerk,

You can get the display name of the branch being built using the expression $Source.RepoName.BranchName$. For some repository types this will be different to  $Source.RepoName.Branch$ which is the Branch path.

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.