Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hunghg255/verify-commit-msg
Verify Commit Message
https://github.com/hunghg255/verify-commit-msg
git husky npm package
Last synced: 3 months ago
JSON representation
Verify Commit Message
- Host: GitHub
- URL: https://github.com/hunghg255/verify-commit-msg
- Owner: hunghg255
- License: mit
- Created: 2023-08-15T14:34:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-17T07:06:26.000Z (6 months ago)
- Last Synced: 2024-11-05T13:05:27.210Z (4 months ago)
- Topics: git, husky, npm, package
- Language: JavaScript
- Homepage:
- Size: 106 KB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A script to verify the commit message format.## Git Commit Message Convention
> This is adapted from [Commit convention](https://www.conventionalcommits.org/en/v1.0.0/).
## Installation
```bash
npm i verify-commit-msg -D
```## Usage with `git-scm-hooks`
[git-scm-hooks](https://github.com/hunghg255/git-scm-hooks)
```bash
npm pkg set scripts.verify-commit=verify-commit-msg
npm pkg set git-hooks.commit-msg="npm run verify-commit"
```## Usage with `husky`
### Config `.husky/commit-msg`
- Bash
```bash
npm pkg set scripts.verify-commit=verify-commit-msg
npx husky add .husky/commit-msg "npm run verify-commit"
```- Or manually update `.husky/commit-msg`
```bash
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"npm run verify-commit
```