When pushing to a branch with a PR the variable CI_PULL_REQUEST used to be set with the PR URL.
Since a few days this variable is systematically empty.
The Pull Request number does appear in the build dashboard (see screenshot).
Looking at the Github webhook payload, it seems they doesn’t send the PR URL in the “push” notification. They sent it in the “pull_request” notification though.
When pushing to a branch that has an open PR, Github generate a “push” and a “pul_request” notification.
It seems CircleCI trigger a job based on the “push” but not on the “pull_request” notification, possibly explaining the missing CI_PULL_REQUEST variable.
Is there a solution to this problem ? How can I obtain the PR URL or Number in my build when I push to a branch with a PR open ?
I guess it would still be possible as Circle CI is able to detect the PR and display it in the dashboard.