https://github.com/n6ai/verify-commit-msg
N6 AI commit message verification for consistant commit messages. Intended to be used w/ simple-git-hooks.
https://github.com/n6ai/verify-commit-msg
commit-message git-hooks hooks simple-git-hooks typescript
Last synced: 5 months ago
JSON representation
N6 AI commit message verification for consistant commit messages. Intended to be used w/ simple-git-hooks.
- Host: GitHub
- URL: https://github.com/n6ai/verify-commit-msg
- Owner: n6ai
- License: mit
- Created: 2022-10-03T13:10:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-01T13:37:07.000Z (6 months ago)
- Last Synced: 2025-04-30T21:53:29.626Z (5 months ago)
- Topics: commit-message, git-hooks, hooks, simple-git-hooks, typescript
- Language: JavaScript
- Homepage: https://npmjs.com/@n6ai/verify-commit-msg
- Size: 85.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @n6ai/verify-commit-msg
Verifies the format of a commit message. Intended to be used with [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks).
## Setup
1. Install packages:
```bash
npm i -D simple-git-hooks
```2. Add `postinstall` script and add a `commit-msg` hook to package.json:
```json
{
"scripts": {
"postinstall": "simple-git-hooks"
},
"simple-git-hooks": {
"commit-msg": "npx @n6ai/verify-commit-msg@latest $1"
}
}
```3. Register Git Hooks:
```bash
npm i
```## Commit message
Messages must be matched by the following regex:
```text
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|build|ci|chore|types|release|deps)(\(.+\))?(\!)?: .{1,50}/
```