Skip to content

Enforce conventional commits with a commit-msg hook - #296

Open
jenul-ferdinand wants to merge 3 commits into
mainfrom
add-commit-msg-hook
Open

Enforce conventional commits with a commit-msg hook#296
jenul-ferdinand wants to merge 3 commits into
mainfrom
add-commit-msg-hook

Conversation

@jenul-ferdinand

@jenul-ferdinand jenul-ferdinand commented Jul 14, 2026

Copy link
Copy Markdown
Member

Why

The commit-msg hook lived only on develop, which sat 177 commits behind main and never merged. This branch carries the hook over so we can drop develop.

What this adds

  • .githooks/commit-msg: a POSIX sh hook that rejects subjects which aren't Conventional Commits.
  • A make hooks target (also run by make install) that enables it via core.hooksPath.
  • A CONTRIBUTING note pointing contributors at it, plus a no-make fallback.

Each clone opts in. Nothing changes for anyone who skips make hooks.

Verification

I ran the hook against 16 messages, 10 valid and 6 invalid. All 16 classified correctly, including uppercase scopes (fix(Vercel):), breaking-change markers (feat!:), and the amend!/fixup!/merge/revert pass-throughs. It checks the subject line only, not the body or footer.

develop is already deleted; this branch holds the only copy of the hook until it merges.

Copilot AI review requested due to automatic review settings July 14, 2026 01:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
monstar Ready Ready Preview, Comment Jul 14, 2026 1:21am

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