🏗️🔧:leave bot commit messages to the bots - #1812
Merged
Merged
Conversation
Renovate writes `chore(deps): …` and dependabot writes `Bump x from y to z`. Neither is this format and neither is theirs to change, so the check that landed an hour ago would have failed every dependency update -- and since they merge themselves on green, none of them would ever land. Matched on the `[bot]@users.noreply.github.com` an app commits as, which is a form no account can take. A human writing the same subject is still held to the format. Assisted-by: Claude-Code:claude-opus-5
✅ Deploy Preview for gh-pages-openinf ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A consequence of #1810, found immediately after it landed and before it could bite.
verify.commitsnow runs on every pull request. Renovate writeschore(deps): bump cssnano to v8.0.4and Dependabot writesBump cssnano from 8.0.3 to 8.0.4— neither is this project's format, and neither is ours to change. So every dependency update would have failed its checks, and since Renovate merges itself only on green, none of them would ever have landed. Quietly.Confirmed against the real thing before fixing: all four bot message shapes are rejected by the rules as they stand.
The match
A GitHub app commits as
<id>+<name>[bot]@users.noreply.github.com, and[bot]is a reserved suffix no account can take, so that is what this matches on.My first attempt matched
^(dependabot|renovate)\[bot\]@and would have caught nothing — the real address begins with the app's numeric id,49699333+dependabot[bot]@…. Checked against actual commits in this repository's history rather than assumed.Verification
Built a bot-authored commit and a human-authored one with the same non-conforming subject:
Bump cssnano from 8.0.3 to 8.0.4, authored bydependabot[bot]leaving 1 written by a botnps test— 15/15 tasks, 45/45 tests.Note
This exempts bot messages rather than making them conform. Making Renovate produce this format is possible —
commitMessagePrefixcan carry the emoji — but it needs an action emoji for a dependency bump, which the vocabulary does not have, and Renovate joins its message parts with a space where this format wants none after the colon. Worth doing deliberately if you want dependency commits to read like the rest; exempting them is what keeps the repository working today.