for people who always said "oh I forgot to prefix msg"
this hook are made to contain prefix github issue
feat/#111
->[#111]
feature/#111
->[#111]
fix/#111-hello-branch
->[#111]
chore/#111-run-autoflake
->[#111]
-
brew install pre-commit
-
create file to Repository Root Path
.pre-commit-config.yaml
-
copy & paste
# .pre-commit-config.yaml
repos:
- repo: https://github.com/KimSoungRyoul/add-github-issue-prefix
rev: v1.0.4
hooks:
- id: add-github-issue-prefix
- install hook ( script is created under the
.git/hooks
)
pre-commit install --hook-type prepare-commit-msg
- repo: https://github.com/KimSoungRyoul/add-github-issue-prefix
rev: v1.0.4
hooks:
- id: add-github-issue-prefix
args:
- --template=[{}] # default: [{}]
- --regex='#\d{1,5}' # default: #\d{1,5}"