polar
Inspired from the husky-go
Docs
Installation
go install github.com/plvhx/polar@latest
Getting Started
You can initialize polar by typing polar init
Make sure you have git initialized.
This will make the .polar directory with the hooks folder. You can add hooks using:
$ polar add <hook> "
<your commands for that hook>
"
Example
$ polar add pre-commit "
go build -v ./...
go test -v ./...
"
Features
Checking commit message before committed (based on git-karma). But first, you must write your own acceptable commit types in .polar-commitmsg-types.yaml
. You can see example configuration format below:
types:
- feat
- fix
- perf
- docs
- style
- refactor
- test
- build
- defect
- foobar
- aabbcc
Then, activate the hook:
$ polar activate-commit-validator
And you're set. Everytime you run git commit
it will validates that commit message you recently supplied.
Blogs and Resources
Get Familiar with Git Hooks
Learn more about git hooks from these useful resources:
License
BSD-3-Clause