Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/conventional-commits/php-commitizen
PHP Commitizen - A CLI tool used to create commits according to Conventional Commits specification
https://github.com/conventional-commits/php-commitizen
commit commitizen conventional-changelog conventional-commits git php php-commitizen
Last synced: 5 days ago
JSON representation
PHP Commitizen - A CLI tool used to create commits according to Conventional Commits specification
- Host: GitHub
- URL: https://github.com/conventional-commits/php-commitizen
- Owner: conventional-commits
- License: mit
- Created: 2018-02-16T17:15:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-09-07T21:07:59.000Z (over 2 years ago)
- Last Synced: 2024-09-19T11:44:24.635Z (3 months ago)
- Topics: commit, commitizen, conventional-changelog, conventional-commits, git, php, php-commitizen
- Language: PHP
- Homepage: https://conventionalcommits.org/
- Size: 40 KB
- Stars: 111
- Watchers: 5
- Forks: 10
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP Commitizen
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/damianopetrungaro/php-commitizen/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/damianopetrungaro/php-commitizen/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/damianopetrungaro/php-commitizen/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/damianopetrungaro/php-commitizen/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/damianopetrungaro/php-commitizen/badges/build.png?b=master)](https://scrutinizer-ci.com/g/damianopetrungaro/php-commitizen/build-status/master)Commitizen is a tool built for create good commits for a clean and readable git history.
This tool follow the [Conventional Commit specs](https://conventionalcommits.org/) and some best practices described in [this slides](https://slides.com/damianopetrungaro/working-with-git)
# 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 argumentYou 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)
```
[
'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
],
];
```