A set of tools to validate conventional commit messages.
Project description
Commit Message Git Hook
Installation Instructions
1. Using the Local Git Hook commit-msg
- Create a folder called
git-hooks
in your project repository. For example, inside the.github
directory:
mkdir -p ./.github/git-hooks
- Create the
commit-msg
git-hook file:
touch ./.github/git-hooks/commit-msg
- And then paste this content in it:
#!/usr/bin/env python3
from commit_msg_git_hook import commit_msg as cm
cm.main()
- You must make it executable:
chmod +x ./.github/git-hooks/commit-msg
- Now run the command below in the repository root to set your repository git hooks path:
git config core.hooksPath .github/git-hooks
NOTE: The configuration is local to this repository. Each repo can have its own hooks path.
- Finally, create a configuration file called
commit-msg.config.json
in your project's root directory:
{
"enabled": true,
"revert": true,
"max_length": 72,
"types": [
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"style",
"test",
"chore"
],
"scopes": []
}
2. Using the Server-Side Scan
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for commit_msg_git_hook-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ee07244df700041462a999fd95c17d490eb9384972fb2c756ce1c2cf3152449 |
|
MD5 | e849d91a139722ae60f2f574002b4826 |
|
BLAKE2b-256 | 3aeab28a59988caf168d6a41e8f7b8f85f23a0d190f6068b316dcc215f05bad4 |
Close
Hashes for commit_msg_git_hook-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4faeab4faef481731059ad75de93cc3eb9e57a64e501425dc988bd9f7428f422 |
|
MD5 | e55490f5d9b0b46db8d0a26a3c2da64b |
|
BLAKE2b-256 | 7207ea90bc51c0e13e51b85c19adc196b6fa7eda834aa726867485f982799027 |