fix(ci): exempt bot commits from the attribution check - #331
Merged
Conversation
Every Dependabot PR has been red since the check landed, for a reason no rebase can fix: Dependabot cannot add a trailer to its own commit message, so `check-attribution.sh --range` fails it by construction. #265 has sat open since 2026-08-16 on exactly this. The script already exempts merges and reverts as "generated by git/GitHub, not authored by anyone." A bot commit is the same category, so it is exempted the same way — matched on a `[bot]` author, in the `--range` path where the author is knowable. The declaration rule is unchanged for every human and agent commit: a message with no trailer is still rejected, including via the commit-msg hook, which has no author to inspect and so exempts nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DRXCexxuJWz949htNeqFZj
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Every Dependabot PR has been red since the attribution check landed, and no rebase can fix it: Dependabot cannot add a trailer to its own commit message, so
check-attribution.sh --rangefails it by construction. #265 has sat open since 2026-08-16 on exactly this, with 15 other checks green.The change
The script already exempts merges and reverts as "generated by git/GitHub, not authored by anyone." A bot commit is the same category. It is now exempted the same way — matched on a
[bot]author, only in the--rangepath where an author exists to inspect.What is deliberately unchanged
--message-filepath (the commit-msg hook) exempts nothing. It has no author to inspect, so a local commit cannot dodge the rule by claiming to be a bot.[bot]into a commit body.Verified
--rangeover #265's Dependabot commit--message-fileorigin/main~3..origin/mainsh -n scripts/check-attribution.shWorth your judgment
This adds a bypass to an enforcement gate in a project whose whole thesis is that enforcement gates should not have bypasses. The argument for it is that the alternative is not stricter — a check that is red on every dependency PR forever is one the team learns to ignore, which is how the gate stops working in practice. If you would rather keep the gate absolute and merge Dependabot PRs with an admin override, revert this and I will close #265 instead.
Proudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/
🤖 Generated with Claude Code
https://claude.ai/code/session_01DRXCexxuJWz949htNeqFZj