2017 © Pedro Peláez
 

library php-commitizen

Help writing Git commit following conventional commit specs

image

damianopetrungaro/php-commitizen

Help writing Git commit following conventional commit specs

  • Wednesday, February 21, 2018
  • by damianopetrungaro
  • Repository
  • 2 Watchers
  • 2 Stars
  • 67 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 509 % Grown

The README.md

PHP Commitizen

Scrutinizer Code Quality Code Coverage Build Status, (*1)

Commitizen is a tool built for create good commits for a clean and readable git history., (*2)

This tool follow the Conventional Commit specs and some best practices described in this slides, (*3)

Installation and usage

You can install it easily with composer, (*4)

$ php composer.phar require --dev damianopetrungaro/php-commitizen, (*5)

Usage is simple too, (*6)

$ php vendor/bin/php-commitizen commit, (*7)

You can also - pass a flag for add all the file to the stage: -a - specify a custom configuration file adding the file path as argument, (*8)

You can ask for more information using: $ php vendor/bin/php-commitizen commit --help, (*9)

Configuration file

The configuration file must return an array (or partial override), (*10)

<?php

return [
    'type' => [
        'lengthMin' => 1, // Min length of the type
        'lengthMax' => 5, // Max length of the type
        'acceptExtra' => false, // Allow adding types not listed in 'values' key
        'values' => ['feat', 'fix'], // All the values usable as type
    ],
    'scope' => [
        'lengthMin' => 0, // Min length of the scope
        'lengthMax' => 10, // Max length of the scope
        'acceptExtra' => true, // Allow adding scopes not listed in 'values' key
        'values' => [], // All the values usable as scope
    ],
    'description' => [
        'lengthMin' => 1, // Min length of the description
        'lengthMax' => 44, // Max length of the description
    ],
    'subject' => [
        'lengthMin' => 1, // Min length of the subject
        'lengthMax' => 50, // Max length of the subject
    ],
    'body' => [
        'wrap' => 72, // Wrap the body at 72 characters
    ],
    'footer' => [
        'wrap' => 72, Wrap the footer at 72 characters
    ],
];

The Versions

21/02 2018

dev-master

9999999-dev

Help writing Git commit following conventional commit specs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Damiano Petrungaro

git commit atomic conventionalcommit conventional commit atomic commit

21/02 2018

v0.1.2

0.1.2.0

Help writing Git commit following conventional commit specs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Damiano Petrungaro

git commit atomic conventionalcommit conventional commit atomic commit

21/02 2018

v0.1.1

0.1.1.0

Help writing Git commit following conventional commit specs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Damiano Petrungaro

git commit atomic conventionalcommit conventional commit atomic commit

21/02 2018

v0.1.0

0.1.0.0

Help writing Git commit following conventional commit specs

  Sources   Download

MIT

The Requires

 

The Development Requires

by Damiano Petrungaro

git commit atomic conventionalcommit conventional commit atomic commit