git-policy-validator
v1.0.0
Published
Validate commit messages and branch names by regex rules
Downloads
2
Readme
git-policy-validator
🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
UNDER CONSTRUCTION
🚧 🚧 🚧 🚧 🚧 🚧 🚧 🚧
Description
A simple CLI that can be used to validate branch and commit messages using a regex configuration.
Examples of use:
# Validate commit message
gvalidate -c "Add new feature"
# Validate branch name
gvalidate -b
Configuration
You must use a config file named .gvalidate.config.json
. Example config file.
{
"branch": {
"regexBranchName": "(feat|fix)/[A-Z]+-[0-9]+",
"ignoreList": []
},
"commit": {
"regexCommitMessage": "(feat|fix): [A-Z]+-[0-9]+ - .*"
}
}
Todo
- Unit tests
- Custom error messages
- [...]
Development
To run locally run the following commands.
# After cloning
npm i
npm run build:dev
npx gvalidate -c "feat: Teste message"