Download the PHP package maxorlovsky/commit-msg-php without Composer
On this page you can find all versions of the php package maxorlovsky/commit-msg-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maxorlovsky/commit-msg-php
More information about maxorlovsky/commit-msg-php
Files in maxorlovsky/commit-msg-php
Package commit-msg-php
Short Description commit-msg-php is a commit-msg hook installer for git with configuration available in composer.json
License MIT
Homepage https://github.com/maxorlovsky/commit-msg-php
Informations about the package commit-msg-php
commit-msg
commit-msg is a commit-msg hook installer for git
with configuration available in composer.json
This is a fork of my other package created for javascript. Why this package is better than other provided in packagist, this one is installed automatically as you add it to your dependencies list. You don't need to ask your developers to run some installation commands separately for every project you have.
The idea of this library is to force using semantic-release rules in commit-message using Angular Commit Message Conventions
Installation (Composer)
Run
This will replace commit-msg in your .git/hooks folder with code, that will run checks on every git commit.
Configuration
Configuration is simple and is done in composer.json
, you just need to add commit-msg object to "config" parameter:
commit-msg->types (array of strings) will add rules, so your git commit messages must start using those types like
or
commit-msg->lineLength (integer) will make sure that lines in your commit message are always less or equal to the number you set into this config
commit-msg->scope (array) will make sure that scope is always following rules specified as Regular Expression
This package is WIP, so propose your ideas - open issue or create pull request.