Enforces conventional git commit messages for git repositories
Project description
enforce-git-message
Enforces conventional git commit messages for all new git repositories you create by running git init .
. For existing repositories, you can go to your source directory and simply run:
enforce-git-message .
Installation
pip install enforce-git-message
Verifying
Go to your source folder and try to commit with a non-conventional message like this and it should fail:
> git commit -m "added a new feature for xyz"
Traceback (most recent call last):
File "C:/Users/prahlad/Documents/scripts/check_commit.py", line 14, in <module>
main()
File "C:/Users/prahlad/Documents/scripts/check_commit.py", line 11, in main
if m == None: raise Exception("conventional commit validation failed")
Exception: conventional commit validation failed
After that, try doing the commit with a valid message and it should work:
> git commit -m "feat(test): added xyz"
>
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
Close
Hashes for enforce-git-message-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f78cc4cb5cd5b37a2f703ee61e8b49b8dc97e3fed371e5551d02ced9c00fac32 |
|
MD5 | bbe0c10b904b26dc806e3f8a05c086c3 |
|
BLAKE2b-256 | c9a614f380cef289dc3e177195209b5b64b8ecabeb594d16d4b28f71dc6e7793 |