@endemolshinegroup/git-author-check
v1.0.1
Published
A pre-commit tool that validates the commit based on the author's email domain
Downloads
31
Readme
@endemolshinegroup/git-author-check
A pre-commit tool that validates the commit authors' email address.
Installation
yarn add -D husky @endemolshinegroup/git-author-check
Usage
This package uses Cosmiconfig to load its' configuration, so you can add a configuration file in one of the following ways:
- a
gitauthorcheck
property in package.json
{
"gitauthorcheck": {
"allowedDomains": [
"endemolshine.com"
]
},
}
- a
.gitauthorcheckrc
file in JSON or YAML format - a
.gitauthorcheckrc.json
file - a
.gitauthorcheckrc.yaml
,.gitauthorcheckrc.yml
, or.gitauthorcheckrc.js
file - a
gitauthorcheck.config.js
orgitauthorcheck.config.ts
file exporting a JS object
{
"allowedDomains": [
"endemolshine.com"
]
}
Then add the following to your Husky configuration file:
{
"hooks": {
"pre-commit": "git-author-check"
}
}