Adds Jira issue key as a tag in commit messages if a Jira key is found in the branch's name.
Add the following to the .pre-commit-config.yaml
file in you repo.
- repo: https://github.com/ESSS/add-jira-tag-pre-commit
rev: v0.1.1
hooks:
- id: add-jira-tag
name: add-jira-tag
stages: [ prepare-commit-msg ]
Then, install pre-commit
hooks (usually pre-commit install
).
⚠️ add-jira-tag
is aprepare-commit-msg
hook, so passing additional arguments--install-hooks -t prepare-commit-msg
may be required during hooks installation.