GithubHelp home page GithubHelp logo

terrorizer1980 / php-commitizen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from conventional-commits/php-commitizen

0.0 0.0 1.0 34 KB

PHP Commitizen - A CLI tool used to create commits according to Conventional Commits specification

Home Page: https://conventionalcommits.org/

License: MIT License

PHP 100.00%

php-commitizen's Introduction

PHP Commitizen

Scrutinizer Code Quality Code Coverage Build Status

Commitizen is a tool built for create good commits for a clean and readable git history.

This tool follow the Conventional Commit specs and some best practices described in this slides

Installation and usage

You can install it easily with composer

$ php composer.phar require --dev damianopetrungaro/php-commitizen

Usage is simple too

$ php vendor/bin/php-commitizen commit

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

You can ask for more information using: $ php vendor/bin/php-commitizen commit --help

Configuration file

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

<?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
    ],
];

php-commitizen's People

Contributors

damianopetrungaro avatar ramsey avatar sensorario avatar

Forkers

exhorder6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.