captainhook/plugin-composer

Composer-Plugin handling your git-hooks

Installs: 13 281

Dependents: 24

Suggesters: 0

Stars: 7

Watchers: 3

Forks: 1

Open Issues: 0

Type:composer-plugin

4.0.0 2019-01-10 19:29 UTC

README

This is a composer-plugin that installs CaptainHook and the corresponding git hooks. For more information visit its Website.

Latest Stable Version Minimum PHP Version Downloads License

Installation:

As this is a composer-plugin the preferred method is to use composer for installation.

$ composer require --dev captainhook/plugin-composer

Everything else will happen automagically.

Customize

You can set a custom name for your hook configuration and a custom path to your .git directory if it is not located in the same directory as your composer.json file. Just add these values to your composer.json in the extra section first.

{
  "extra": {
    "captainhook-config": "hooks.json",
    "captainhook-git-dir": "../.git"
  }
  
}

If you want to see the installation in action have a look at this short installation video.

Install demo

A word of warning

It is still possible to commit without invoking the hooks. So make sure you run appropriate backend-sanity checks on your code!