Need a way to get dest branch on pull request buulds

envars

#1

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.


#2

+1 for more env variables.

Also there is a workaround to fetch GitHub API for additional info (having PR number), described here: Access real Branch name for Pull Request/Fork Build

It’s pretty sad that CircleCI has so limited list of env variables.


#3