Hi, fellow Buildkiters. First of all thanks for your great work, Buildkite is indeed the best CI system I ever used!
Recently I bumped into a missing feature that might be interesting. We use GitHub integration and GitHub allows us to set up a trigger on Branch or tag deletion. Meanwhile, there’s no such event to allow on the Buildkite side.
An example use case for this is dropping a per-branch environment on branch deletion. We collect quite a bit of environments during the week in the cloud and they while not deleted.
I can think of various workarounds for this, but could you advise me on how to implement it with minimum pain?
Welcome to the community! and thank you for your warm words!
Really interesting suggestion! But unfortunately, we don’t support triggering builds on brunch deletion or PR closed. We try to cover the common cases with our webhook integration, and we typically optimize Buildkite’s GitHub webhook integration for triggering builds on code.
What we’d suggest you instead, and which I think might be both more resilient and more powerful, is setting up a small GitHub Action which responds to these particular events — label added, and pull request closed — and either trigger a Buildkite build via our API, or does the setup or teardown directly. We’ve seen customers do things like this when they have very specific workflow requirements around which actions they want to respond to in particular repos with particular conditions, beyond what we offer with webhooks.