Add commit message check - #1
Conversation
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughAdds a Python commit-message checker for subject length, description wrapping, and prohibited attribution trailers. Packages it as a composite GitHub Action, documents its policies and usage, adds unit tests, and integrates validation into a GitHub Actions CI workflow. Updates 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
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: 3
🧹 Nitpick comments (1)
check-commit-messages/check.py (1)
147-222: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicate code-fence/blockquote tracking between
get_description_violationsandget_attribution_violations.Both functions independently reimplement the same line-classification state machine (fence-toggle detection, in-code-block tracking, blockquote skip). Extracting a shared line iterator/helper would reduce duplication and the risk of the two implementations drifting apart as the policy evolves.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 409df84a-5862-434a-a3eb-844425ae2f76
📒 Files selected for processing (8)
.github/workflows/ci.yml.gitignoreLICENSEREADME.mdcheck-commit-messages/README.mdcheck-commit-messages/action.ymlcheck-commit-messages/check.pycheck-commit-messages/test_check.py
23f7e69 to
7ac6f2f
Compare
15b7623 to
0f42d17
Compare
0f42d17 to
23e0bde
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a reusable composite GitHub Action (plus implementation + CI) to enforce a shared commit-message policy across projects: commit subject length limits, description line wrapping rules, and restrictions on AI/coding-tool attribution trailers.
Changes:
- Added
check-commit-messagescomposite action that inspects PR commit messages viagitand enforces subject/description/trailer rules. - Added a Python implementation (
check.py) with unit tests validating wrapping exemptions and prohibited attribution markers. - Added repo documentation and CI workflow to run the unit tests and the action on pull requests.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| README.md | Introduces the repo and links to the new commit-message check action. |
| check-commit-messages/action.yml | Composite action entrypoint that validates base_ref and runs the checker. |
| check-commit-messages/check.py | Core policy enforcement logic (subject length, wrapping checks, trailer attribution checks) and output formatting. |
| check-commit-messages/test_check.py | Unit tests for subject length, wrapping exemptions, and attribution marker blocking. |
| check-commit-messages/README.md | Documents policy and provides usage example for consumers. |
| .github/workflows/ci.yml | Adds CI to run unit tests and execute the action on PRs. |
| .gitignore | Ignores Python bytecode / cache files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
23e0bde to
a88dee4
Compare
a88dee4 to
7232161
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 37104103-aa1e-4b10-ba35-0e1fd55c5199
📒 Files selected for processing (7)
.github/workflows/ci.yml.gitignoreREADME.mdcheck-commit-messages/README.mdcheck-commit-messages/action.ymlcheck-commit-messages/check.pycheck-commit-messages/test_check.py
🚧 Files skipped from review as they are similar to previous changes (5)
- .gitignore
- .github/workflows/ci.yml
- check-commit-messages/action.yml
- check-commit-messages/README.md
- check-commit-messages/test_check.py
7232161 to
fca689c
Compare
Adds a reusable action that enforces commit title length, description
wrapping, and AI or coding tool attribution policy.
Projects can use a shared, centrally maintained commit-message policy.