Skip to content

ci: allow the "!" breaking-change marker in the commit-msg hook - #4

Merged
manuelmauro merged 1 commit into
mainfrom
fix/commit-msg-breaking-marker
Jun 17, 2026
Merged

ci: allow the "!" breaking-change marker in the commit-msg hook#4
manuelmauro merged 1 commit into
mainfrom
fix/commit-msg-breaking-marker

Conversation

@manuelmauro

Copy link
Copy Markdown
Owner

Problem

The commit-msg conventional-commit check matched <type>(scope): <desc> but had no slot for the ! that Conventional Commits uses to flag a breaking change. Subjects like refactor(scope)!: ... were rejected locally, forcing the breaking marker to be smuggled in via the squash-merge PR title instead of living in the commit itself.

Fix

Add an optional !? between the (optional) scope and the colon, and update the error hint to show it:

-grep -qE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?: .+'
+grep -qE '^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+'

Verification

subject before after
refactor(atomic)!: breaking FAIL PASS
feat!: breaking no scope FAIL PASS
docs(adr): normal PASS PASS
nope: bad type FAIL FAIL

One-line change to lefthook.yml; no behavior change for existing non-breaking subjects.

Ported from manuelmauro/algonaut#320.

@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@manuelmauro has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 40 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: efd72835-89da-4e28-aba7-0c5b85885b52

📥 Commits

Reviewing files that changed from the base of the PR and between f4ebf35 and f72eb50.

📒 Files selected for processing (1)
  • lefthook.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/commit-msg-breaking-marker

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 and usage tips.

@manuelmauro
manuelmauro merged commit 8fa79fd into main Jun 17, 2026
2 checks passed
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.

1 participant