We've got a special TeamCity configuration for building GitHub pull requests, using the standard "+:refs/pull/*/merge" refspec on the GitHub repo.
So while that let's our configuration build the pull request, what I'd like to do is access the pull requests source and target branch names to do some special processing / error handling.
If ProjectRepo has pull request 1234 raised to merge FredsFork/feature/FizzBuzzCalculator into ProjectRepo/master, then TeamCity will attempt to build the /pull/1234/merge reference.
I'd like to be able to use the GitHub API to query info about PR 1234, and discover that the base_ref is "master" and the head_ref is "feature/FizzBuzzCalculator"
Specifically, I'd like to use a different checkout directory for different base_refs. We can use incremental builds (under 5 minutes) for all pull requests that target the same branch, but as soon as another PR is raised that targets a different upstream branch, we are forced to do a full rebuild, which adds 40 minutes to our build time.
Right now, TeamCity thinks the name of the branch it is building is
/pull/1234/merge. I'd like to somehow modify the VCS configuration so that the default agent checkout directory is
So if I can keep unrelated PRs separate, our PR builds speed up incredibly.
Does TeamCity's GitHub integration have any way of exposing this information for a pull request?