Sailr helps you follow the Conventional Commits conventional by installing a configurable commit-msg
into your Git projects.
To use Sailr, you must have jq installed.
curl -o- https://raw.githubusercontent.com/craicoverflow/sailr/master/scripts/install.sh | bash
Remove the commit-msg
Git hook from your project:
rm <your-project>/.git/hooks/commit-msg
Once installed, you must run git init
in your Git projects to (re)initialize your repository. The hook will look for a configuration file in the following locations (in order):
- The root of your Git project.
SAILR_CONFIG
: You can set a custom location for yoursailr.json
config by setting theSAILR_CONFIG
environment variable. Example:SAILR_CONFIG=$HOME/.sailr/sailr.json
.
{
"enabled": true,
"revert": true,
"length": {
"min": 1,
"max": 52
},
"types": [
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"style",
"test",
"chore"
]
}
Note: you can disable Sailr in your project by setting enabled
to false
in sailr.json
.
Unit tests are written in Python. They are located in ./tests
To run all tests:
make test