You can add CommitMe as a pre-commit by:
- Installing pre-commit
- Including CommitMe in your
.pre-commit.config.yaml
file, e.g.:
repos:
- repo: https://github.com/dev-build-deploy/commit-me
rev: v0.12.0
hooks:
- id: commit-me
- Installing the
commit-msg
hooks
$ pre-commit install --hook-type commit-msg
The Pre-Commit hook will run the ./bin/pre-commit-me
executable:
Usage: pre-commit-me [options] <file>
Conventional Commit message validation (pre-commit hook)
Arguments:
file The file containing the commit messages to validate.
Options:
-c, --config <file> The configuration file to use.
-h, --help display help for command
Therefor, you can use the args
keyword to specify a list of options
, for example:
repos:
- repo: https://github.com/dev-build-deploy/commit-me
rev: v0.13.1
hooks:
- id: commit-me
args: [
# Specify a custom configuration file path
'--config', '.github/.commit-me.json'
]