For Pull Request builds, how to get real branch name of user’s fork?
I was sure that
$CIRCLE_BRANCH from https://circleci.com/docs/environment-variables/ should work, but for PR build it shows string, unrelated to real branch name.
# expected real branch name like: `testing-circleci`, not `pull/1234`. ubuntu@box407:~/st2$ echo $CIRCLE_BRANCH pull/2259
In my example I need to pass this data in webhook for further processing.
$CIRCLE_BRANCH has different logic, then
$CIRCLE_PR_BRANCH makes sense.