A pre commit hook that adds a jira ticket number from branch name to the beginning of a commit message
A ridiculously simple pre-commit hook that parses and adds jira ticket from git branch to your commit messages.
Template: [BEEP-666] your commit message
To be used with pre-commit package manager installed.
pre-commit install --hook-type pre-commit --hook-type prepare-commit-msg
If you need to overwrite hooks pass:
pre-commit install --hook-type pre-commit --hook-type prepare-commit-msg --overwrite
Provide one of the available versions.
repos:
- repo: https://github.com/strangesphagnum/sayjira
rev: 0.1.2
hooks:
- id: sayjira
If you provide stage to all your hooks like:
repos:
- repo: https://github.com/strangesphagnum/sayjira
rev: 0.1.2
hooks:
- id: sayjira
- stages: [prepare-commit-msg]
Pre-commit won't run hooks twice
That's it. Enjoy!