enforce-git-message-1.0.1
توضیحات
Enforces conventional git commit messages for git repositories
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | enforce-git-message-1.0.1 |
| نام | enforce-git-message |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Prahlad Yeri |
| ایمیل نویسنده | prahladyeri@yahoo.com |
| آدرس صفحه اصلی | https://github.com/prahladyeri/enforce-git-message |
| آدرس اینترنتی | https://pypi.org/project/enforce-git-message/ |
| مجوز | MIT |



<!-- https://img.shields.io/travis/prahladyeri/enforce-git-message/master.svg -->
<!--  -->


<!---->
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JM8FUXNFUK6EU)
[](https://twitter.com/prahladyeri)
# enforce-git-message

Enforces [conventional git commit messages](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) 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
Examples of valid commit messages:
```diff
+ 61c8ca9 fix: navbar not responsive on mobile
+ 479c48b test: prepared test cases for user authentication
+ a992020 chore: moved to semantic versioning
+ b818120 fix: button click even handler firing twice
+ c6e9a97 fix: login page css
+ dfdc715 feat(auth): added social login using twitter
```
Examples of invalid commit messages resulting in an error message:
```diff
- 61c8ca9 fix for navbar not responsive on mobile
- 479c48b prepared test cases for user authentication
- a992020 moved to semantic versioning
- b818120 fixed button click even handler firing twice
- c6e9a97 login page css fix
- dfdc715 added social login auth feature using twitter
```
# 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"
COMMIT FAILED!
Please enter commit message in the conventional format and try to commit again. Examples:
+ 61c8ca9 fix: navbar not responsive on mobile
+ 479c48b test: prepared test cases for user authentication
+ a992020 chore: moved to semantic versioning
+ b818120 fix: button click even handler firing twice
+ c6e9a97 fix: login page css
+ dfdc715 feat(auth): added social login using twitter
After that, try doing the commit with a valid message and it should work:
> git commit -m "feat(test): added xyz"
>
# Notes
[Read this article](https://prahladyeri.com/blog/2019/06/how-to-enforce-conventional-commit-messages-using-git-hooks.html) to fully understand how the enforcement actually works by using git hooks.
# Attribution
- *Tick Icon made by [smashicons](https://www.flaticon.com/authors/smashicons) from www.flaticon.com is licensed by [CC 3.0 BY](http://creativecommons.org/licenses/by/3.0/)*
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >= 3.4 | Python |
نحوه نصب
نصب پکیج whl enforce-git-message-1.0.1:
pip install enforce-git-message-1.0.1.whl
نصب پکیج tar.gz enforce-git-message-1.0.1:
pip install enforce-git-message-1.0.1.tar.gz