This is a follow up from https://twitter.com/atticoos/status/726648787976876032
I notice my builds from a branch within a PR does not contain the environment variable CIRCLE_PR_NUMBER
.
It does contain CI_PULL_REUQEST
, which contains the link to the PR. I am currently parsing this to get the PR number for my automated CI testing deployments (pr123.builds.xyz.com) - which is less than ideal.
My flow:
- Push branch to the remote
- Push triggers the CI
- Open pull request
– Unfortunately the build has already ran from the push, so it’s unlikely it has a PR context since the PR is opened after the push - Push another commit to the branch that is now part of a PR
- Now the
CI_PULL_REQUEST
shows up, but not theCIRCLE_PR_NUMBER
How do I get CIRCLE_PR_NUMBER
to show up?
And ideally I’d like to see a build start when the PR is opened too, but from research, that does not appear to be supported.