@apounited/verify-commit-msg
v1.0.6
Published
Commit message verification for simple-git-hooks.
Maintainers
Readme
@apounited/verify-commit-msg
Verifies the format of a commit message. Intended to be used with simple-git-hooks.
Setup
Bun
- Add
postinstallscript and add acommit-msghook to package.json:
{
"scripts": {
"postinstall": "bunx simple-git-hooks"
},
"simple-git-hooks": {
"commit-msg": "bunx @apounited/verify-commit-msg@latest $1"
}
}- Register Git Hooks:
bun iNode
- Install package:
npm i -D simple-git-hooks- Add
postinstallscript and add acommit-msghook to package.json:
{
"scripts": {
"postinstall": "simple-git-hooks"
},
"simple-git-hooks": {
"commit-msg": "npx @apounited/verify-commit-msg@latest $1"
}
}- Register Git Hooks:
npm iCommit message
Messages must be matched by the following regex:
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types|release|deps)(\(.+\))?(!)?: .{1,50}/