Allowed more "ref" lines in commit messages#28261
Conversation
no ref This change should have no user impact. It just quiets a development-only warning. Before this change, our pre-commit hook showed a warning unless your commit's third line started with "ref", "fixes", or "closes". Now it supports a wide array of options. These are lifted from some our internal document, "How to write commit messages".
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR updates the commit-msg validation hook to accept a broader set of issue-link keywords on the third line of commit messages. The validation regex is expanded to recognize 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/hooks/commit-msg.bash:
- Around line 70-71: The regex used to validate third_line incorrectly contains
"closing\ fix" which only matches the literal phrase "closing fix" and misses
valid forms like "closing ..." or standalone "closing"; update the pattern in
the if-condition that inspects the variable third_line to replace the "closing\
fix" token with "closing" (or include both "closing" and "fix" variants) so the
alternation correctly matches phrases starting with "closing" as well as other
keywords (the change should be made in the regex inside the if that tests
"$third_line" in .github/hooks/commit-msg.bash).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 712c0868-4288-47a5-8ed7-b769bc6aed63
📒 Files selected for processing (1)
.github/hooks/commit-msg.bash
no ref
This change should have no user impact. It just quiets a development-only warning.
Before this change, our pre-commit hook showed a warning unless your commit's third line started with "ref", "fixes", or "closes".
Now it supports a wide array of options. These are lifted from some our internal document, "How to write commit messages".