The commit-helper do exactly what it's name suggest: helps you create and maintain your commit policy by tailoring your commit message into a commit convention.
Keeping a commit policy may sound like an easy thing to do, but in reality we both know that it isn't.
Sometimes we, the developers, go full-loco while programming and make mistakes when commiting. That's fine, everyone makes mistakes. But, what if those mistakes could be avoided?
Just follow the commands below:
# make sure you have the dependencies installed in your machine and
# have git ready to use
$ apt install python3-pip git
$ pip3 install pyyaml
# clone the repo into your home
$ git clone https://github.com/andre-filho/commit-helper.git ~/.commit-helper
# create a function in your .bashrc
$ echo "commit(){ python3 ~/.commit-helper/generator.py; }" >> ~/.bashrc
# reload terminal
$ source ~/.bashrc
For this project to work smoothly, you must have in your working directory a file named commiter.yml. In this file you must pass the commit convention that you want to use, following the example:
convention: angular # tag(context): commit message
# or
convention: changelog # TAG: commit message
# or
convention: symphony # [Tag] commit message
# and if you're feeling adventurous
convention: none # Commit message
Supported conventions available:
- angular/karma
- changelog
- symphony
In the event of no commiter.yml file presence, you will be prompted with the following option menu:
No config files found!
Running default script...
what type of commit convention are you using?
(default): No convention
1: Karma/Angular
2: Conventional changelog
3: Symfony CMF
Name | Username |
---|---|
André de Sousa Costa Filho | @andre-filho |