This idea has been merged into another idea. To comment or vote on this idea, please visit CCI-I-894 Provide env variable for branch name targeted by pull request.
CIRCLE_TARGET_BRANCH env var Merged
It would be nice to be able to see which branch the current PR is targeted and it seems there have been a few people so far requesting this feature,: https://discuss.circleci.com/t/create-a-circle-target-branch-envar/10022, https://discuss.circleci.com/t/add-environment-varible-circle-pr-base-branch/6189, and I have seen more places where this feature has been mentioned. Other CIs provide this information and it would also make it easier to fulfill use-cases like: https://circleci.com/ideas/?idea=CCI-I-208 in a very generic manner.
Our specific use case would be, I want to be able get the full commit range range of the current PR, so even when a new commit is pushed that triggers a new build it would show the full commit range from the first commit and not just the range form the previous build/commit.