Continuing the discussion from Build only pull request to a specific branch:
[quote=“eyal_rounds, post:7, topic:903, full:true”]
OK, i’ve tested this issue using an example github project and a pull request.
you supply the url for the pull request on github so assuming i have a token i can query github for the pull request details, however the CIRCLE_BRANCH for the pull request build is ‘new_branch’ which is my topic branch, not master into which this pull request is being merged. You do not include this information in the ENV even though you do have it in the webhook[/quote]
It looks like I was mistaken, and there is no way to get the destination tree name for pull requests using the env variables. Creating a feature request.