Build only pull request to a specific branch

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 ave it in the webhook which is a real shame.

For most of what i need i actually need to use curl and scripts to get the info i need and not your own platform.