I want to be able filter out certain bot generated commits from triggering builds via the GitHub integration. Unfortunately it isn’t enough to be able to filter on commit author, because I still need builds to trigger after rebases which leave the bot commits on top. To this end, I’d like
to be exposed based on the commiter of the HEAD commit in addition to the author fields, which would be sufficient for me to do the filtering that I need.
Welcome to buildkite community! That’s an intresting use case you have there!
While we are looking into it, one thing that I have on top of my head is to levarage the use of Skipping builds | Buildkite Documentation feature, along with use of conditionals, provided your bot generated commits have a standard pattern that you can use to omit the builds out. Let us know if that works : )
The only new relevant section is the “Ignore a commit” section and that suffers from the same issue with rebases that I was describing when trying to ignore with a conditional on the commit author.
Thanks for the follow up. I’m taking a look through the GitHub documentation and see now mention that the ID is even passed through via the webhook. Are you seeing otherwise?
@benmc I just assumed there would be the name info for the committer as the author and I didn’t bother to check. I don’t really need the id. The name, email, and username is fine!
The build.committer information may be available in the webhook payload, however it is not translated into a build variable unlike with build.author. Thus it is not possible to filter steps within the build with this value.
One possible solution would be to add custom tags or labels to bot-generated commits on the GitHub side. These tags can then be used in your build filtering logic to exclude those commits from triggering builds. This approach allows you to manage and filter commits more effectively based on the tags you assign.