Husky command to add JIRA ticket ID into the commit message if it is missed.
The JIRA ticket ID is taken from a git branch name.
Install the package using NPM
npm i -D husky nfq-jira-prepare-commit-msg
Inside your package.json add a standard husky npm script for the git hook:
{
"husky": {
"hooks": {
"prepare-commit-msg": "nfq-jira-prepare-commit-msg"
}
}
}
The following patterns are currently supported:
- /([A-Z]+-\d+)/i
- Support user patterns
- Support configuration (package.json)
- Lint
- Tests
MIT