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.
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.