For customers triggering builds via GitHub, we've added a new environment variable to track the draft status of a pull request:
1
BUILDKITE_PULL_REQUEST_DRAFT="true"
If a pull request triggers a build while in a draft state, this variable will be present in all the build's command jobs. The variable will be absent otherwise.
This variable allows customizing your uploaded pipelines or running jobs at the agent level based on a pull request's draft status. For example, you might run a faster subset of your tests while a pull request is still in a draft state.
Check out our docs on environment variables for more information.
If you have any feedback, we'd love to hear from you in our community Slack channel, or drop us an email to support@buildkite.com.
Create an account to get started with a 30-day free trial. No credit card required.