fix: clean up pre-commit config and hook#297
Conversation
WalkthroughEnables the check-branch hook in .pre-commit-config.yaml, removes explicit commit-msg stage and prunes commented hook entries. In .pre-commit-hooks.yaml, removes the stages: [commit-msg] from check-message. README.rst receives minor wording and emphasis updates in Highlights/What’s New. No code or runtime logic changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 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 |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
=======================================
Coverage 87.33% 87.33%
=======================================
Files 8 8
Lines 687 687
=======================================
Hits 600 600
Misses 87 87 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.pre-commit-config.yaml(1 hunks).pre-commit-hooks.yaml(0 hunks)README.rst(1 hunks)
💤 Files with no reviewable changes (1)
- .pre-commit-hooks.yaml
🧰 Additional context used
📓 Path-based instructions (1)
.pre-commit-config.yaml
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Maintain pre-commit configuration to run repository hooks
Files:
.pre-commit-config.yaml
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: commit-check/commit-check#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-03T10:28:06.793Z
Learning: Applies to .pre-commit-config.yaml : Maintain pre-commit configuration to run repository hooks
📚 Learning: 2025-10-03T10:28:06.793Z
Learnt from: CR
PR: commit-check/commit-check#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-03T10:28:06.793Z
Learning: Applies to .pre-commit-config.yaml : Maintain pre-commit configuration to run repository hooks
Applied to files:
.pre-commit-config.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
- GitHub Check: install (3.10, macos-latest)
- GitHub Check: install (3.13, windows-latest)
- GitHub Check: install (3.14, ubuntu-24.04)
- GitHub Check: install (3.13, macos-latest)
- GitHub Check: install (3.14, windows-latest)
- GitHub Check: install (3.14, macos-latest)
- GitHub Check: install (3.11, macos-latest)
- GitHub Check: install (3.12, windows-latest)
- GitHub Check: install (3.10, ubuntu-24.04)
- GitHub Check: install (3.11, windows-latest)
- GitHub Check: install (3.10, windows-latest)
- GitHub Check: install (3.9, macos-latest)
- GitHub Check: install (3.9, ubuntu-24.04)
- GitHub Check: install (3.9, windows-latest)
| - id: check-message | ||
| # - id: check-branch # uncomment if you need. | ||
| - id: check-branch # uncomment if you need. | ||
| - id: check-author-name # uncomment if you need. | ||
| - id: check-author-email # uncomment if you need. |
There was a problem hiding this comment.
Restore commit-msg installation for check-message.
Dropping default_install_hook_types: [pre-commit, commit-msg] (and the commit-msg stage) means pre-commit install no longer sets up the commit-msg hook, so check-message never runs. The commit message validator silently stops working—a regression. Please restore commit-msg installation (either via default_install_hook_types or per-hook stages: [commit-msg], plus the matching change in .pre-commit-hooks.yaml) so the check keeps executing.
repos:
+- default_install_hook_types: [pre-commit, commit-msg]
- repo: https://github.com/commit-check/commit-check
rev: v0.10.2
hooks:
- id: check-message
+ stages: [commit-msg]Based on learnings
Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
.pre-commit-config.yaml lines 36-39: the commit-msg hook installation was
removed so the check-message hook never runs; restore commit-msg installation by
either adding back default_install_hook_types: [pre-commit, commit-msg] to the
file or by adding stages: [commit-msg] to the check-message hook entry and also
ensure the corresponding .pre-commit-hooks.yaml lists commit-msg in that hook's
stages; update both files accordingly so pre-commit install sets up the
commit-msg hook and the check-message hook executes on commit messages.



Summary by CodeRabbit
Documentation
Chores