Skip to content

feat: add commit message convention and validation hook#198

Open
afif1400 wants to merge 1 commit intosantifer:mainfrom
afif1400:nightshift/commit-normalize
Open

feat: add commit message convention and validation hook#198
afif1400 wants to merge 1 commit intosantifer:mainfrom
afif1400:nightshift/commit-normalize

Conversation

@afif1400
Copy link
Copy Markdown

@afif1400 afif1400 commented Apr 11, 2026

Summary

  • Add .github/commit-convention.md documenting Conventional Commits standard with types, scopes, and examples
  • Add .github/hooks/commit-msg shell script that validates messages against the pattern — rejects empty descriptions, empty scopes, invalid types, and non-conforming formats
  • Add setup-hooks npm script for opt-in local hook installation via npm run setup-hooks
  • Update CONTRIBUTING.md with commit message section and updated Quick Start steps
  • Update CLAUDE.md Stack and Conventions with commit format rule

Test plan

  • Hook accepts valid messages: feat: x, fix(dashboard): y, feat(modes)!: z, release: v1.2.0, Merge ..., Revert ...
  • Hook rejects invalid messages: imperative (Add X), empty description (fix: ), empty scope (feat(): x), bad type (invalid: x), branch-style (Feat/interview), empty string
  • Run npm run setup-hooks on fresh clone to verify symlink

Automated by nightshift

Document Conventional Commits standard in .github/commit-convention.md,
add a commit-msg git hook for local validation, wire it via an opt-in
npm script (setup-hooks), and update CONTRIBUTING.md and CLAUDE.md so
both human and AI contributors follow the same format.

Nightshift-Task: commit-normalize
Nightshift-Ref: https://github.com/marcus/nightshift
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