Environment variable for Pull Request ID

Issue #14499 closed
Momo Kornher
created an issue

I am proposing to add a new environment variable BITBUCKET_PR to pipeline builds triggered by a pull request.

When set, the build was triggered by a pull request and it contains the id of the PR. When not set, the build was not triggered by a pull request.

Use case: Additional feedback can be added to a PR via a comment without the need to enforce a build status or go through a complicated third party upload.

Comments (4)

  1. Matt Ryall staff

    Thanks for the request, Momo. We don't currently support triggering builds with pull requests (tracked as #13438), so I'm not sure what you're referring to.

    How are you triggering builds by pull requests today?

    At the point where we build #13438 (not currently scheduled), then we would definitely add a BITBUCKET_PULL_REQUEST environment variable or similar to provide this information. So if that's what you're after, we will close this issue as a duplicate of #13438 and just mention it on that ticket.

  2. Momo Kornher reporter

    Thanks Matt, yes that's fine. I guess I confused the fact that a PR can require successful builds with actually building the PR (which is not the case).

  3. Log in to comment