Allow disabling generated GitHub commit statues *per step*

TL;DR: Provide a way to disable “Update commit statuses” (aka Buildkite-generated commit statuses) at the step-level, instead of having to disable it at pipeline level and forcing us to be “all or nothing” (explicit on all the steps, or none)

Context

Currently, if one wants to customize the name of a GitHub Commit Status on a step, as per the documentation, one can use the following:

steps:
  - label: "Example Script"
    command: "script.sh"
    notify:
      - github_commit_status:
          context: "my-custom-status"

But that custom GitHub commit status notification does not disable the one auto-generated by Buildkite.

Which means that you either:

  • End up having two commit statuses reported on your PR for this “Example Script” label (one named example-script generated by Buildkite due to Update commit statuses, and one named my-custom-status)
  • Or have to disable the “ Update commit statuses” checkbox in the Buildkite settings (aka provider_settings.publish_commit_status’ terraform attribute) of your whole pipeline. But then that means that you’ll have to add notify entries for all your steps explicitly now, since you disabled the setting generating implicit ones at the pipeline level.

This is particularly annoying because that means that if we want to just customize only a couple of step’s GitHub commit status name, we end up having to explicitly customize them all; and also risk forgetting to add a notify: attribute when adding a new step to our pipeline later.

And if we have many steps in our pipeline, all those notify:… blocks now required on each individual step—only because we wanted to customize the name of one of them and now we have to make all of them explicit—will also start to make the pipeline.yml quite verbose, while all we wanted was customize a single step.

Request

It would be nice if one could disable Buildkite-generated commit statuses at the step level, especially so that we can only customize the name of some steps’ commit statuses explicitly but still have non-explicitly-customized one be generated by Buildkite.

Suggestion/Option 1

If “ Update commit statuses” is checked in the pipeline settings, only have Buildkite generate GitHub commit statuses for steps that don’t have an explicit notify: { github_commit_status: … } entry.

(This could be an opt-in behavior via a new setting if we don’t want to break the existing behavior by default)

That way, we could keep the setting enabled at the pipeline level and have commit statuses by default for any step, while not having duplicate commit statuses for a single step if we want to customize only that step’s commit status name.

Suggestion/Option 2

Add a disable_buildkite_generated_status: true (or similar, name open to bikeshedding) attribute to github_commit_status, so that we can keep “ Update commit statuses” enabled at pipeline level, yet disable them at step level, using a YAML syntax like this:

steps:
  - label: "Example Script"
    command: "script.sh"
    notify:
      - github_commit_status:
          context: "my-custom-status"
          disable_buildkite_generated_status: true

Hey @ohalligon

Thank you for your detailed feature request regarding the ability to disable Buildkite-generated commit statuses at the step level. You’ve identified a significant point that is acknowledged in our documentation.

We recognize the challenge of deciding between duplicating commit statuses or managing them explicitly at the pipeline level. Your input will be taken into account for future updates; however, at present, we’re unsure if this feature will be included in our current roadmap.