Skip to content

Add local commit message hook - #2

Merged
electrum merged 1 commit into
mainfrom
user/electrum/add-commit-message-hook
Jul 31, 2026
Merged

Add local commit message hook#2
electrum merged 1 commit into
mainfrom
user/electrum/add-commit-message-hook

Conversation

@electrum

@electrum electrum commented Jul 31, 2026

Copy link
Copy Markdown
Member

Why

  • Projects using the shared check only learn about invalid commit messages after CI.
  • pre-commit gives consuming projects a standard way to install shared Git hooks in each checkout without copying checker logic.

Approach

  • Publish the checker as a pre-commit commit-msg hook so it validates the proposed message before Git creates the commit.
  • Use the same implementation for local feedback and pull-request CI.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@electrum, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 35e201d2-4391-4311-94b0-9ea591b60fc8

📥 Commits

Reviewing files that changed from the base of the PR and between 98f2fa5 and 6c10627.

📒 Files selected for processing (4)
  • .pre-commit-hooks.yaml
  • check-commit-messages/README.md
  • check-commit-messages/check.py
  • check-commit-messages/test_check.py
📝 Walkthrough

Walkthrough

The commit-message checker now validates either revision ranges or individual commit-message files. File input is cleaned of Git comments and scissors sections before shared subject, description, and attribution checks run. The CLI adds mutually exclusive message-file and revision-range modes with distinct success output. A pre-commit commit-msg hook and documentation for local installation and SHA pinning were added, along with integration coverage for cleaned message files.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3780e821-822e-48d9-8d43-5969d2668d18

📥 Commits

Reviewing files that changed from the base of the PR and between 3cd4cf2 and 98f2fa5.

📒 Files selected for processing (5)
  • .pre-commit-hooks.yaml
  • README.md
  • check-commit-messages/README.md
  • check-commit-messages/check.py
  • check-commit-messages/test_check.py

Comment thread check-commit-messages/check.py Outdated
Projects need immediate feedback from the same commit-message policy
enforced in pull requests. Expose the checker through pre-commit so local
hooks and CI share one implementation.
@electrum
electrum force-pushed the user/electrum/add-commit-message-hook branch from a34d0fd to 6c10627 Compare July 31, 2026 01:37
@electrum
electrum added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 2752e29 Jul 31, 2026
1 check passed
@coderabbitai coderabbitai Bot mentioned this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants