A set of tools to validate git Conventional Commit messages.
Project description
Commit Message Git Hook
A set of tools to validate git Conventional Commit messages.
See the Conventional Commits Specification.
Installation Instructions
Install from PyPI (Python Package Index)
Run the script below to install the latest version of this package:
pip install commit-msg-git-hook --upgrade
Setup the Local Git Hook commit-msg
Run the script below to scaffold the hook:
python3 -m commit_msg_git_hook.setup
It does the following steps:
- Create a directory for git-hooks, by default
./.github/git-hooks
. - Set the hooks path to the current repository as the created directory.
- Create the
commit-msg
hook file. - Fill it with a basic script to call
commit_msg.main()
, from this package. - Make the hook file executable.
- Create a configuration file
commit-msg.config.json
if it doesn't exist.
Configuration Instructions
Customize the configuration file commit-msg.config.json
to fit your project's needs.
Probably you will want to add scopes, to fully utilize the Conventional Commits Specification.
Basic Usage
After setting up and adding the new files to your git remote repository, your collaborators will
need to run the installation and setup steps again.
But, this time, the setup will only set the hooks path and make sure the file commit-msg
is
executable.
Every time you make a commit, the hook will check if its message is in accordance to the specification and the project's customization.
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
Hashes for commit_msg_git_hook-0.0.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88784bb06589f43d877be81ca8ed93b8e5d8acbf17c9f063a7902107df114f55 |
|
MD5 | a704561e9c583230e0955a678a72e9dc |
|
BLAKE2b-256 | d9c3bacb15456a98de26dfbc9ce81188c2c47c0835e6489932a06aaa2eb1f843 |
Hashes for commit_msg_git_hook-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6738295e81be03c8aa7e882446523c573202136f5f9a1f6e075de82929a38370 |
|
MD5 | a9346d11575b3b6f2b3a42ef5e255f57 |
|
BLAKE2b-256 | 38972f5a01a6cca5dae05c1a2a1ee83449270269aa3abea9c14d7031a2a67d97 |