Skip to content

andre-filho/commit-helper

Repository files navigation

Maintainability Codacy Badge

Commit Helper

What does it do?

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.

Why should I use this?

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?

Installation

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

Usage and configuration

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

Project's maintainers

Name Username
André de Sousa Costa Filho @andre-filho