sashas777 / plugin-composer
Composer-Plugin handling your git-hooks
Fund package maintenance!
sashas777
Installs: 349
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 4
Type:composer-plugin
Requires
- php: ^7.1
- composer-plugin-api: ^1.1
- sashas777/captainhook: ^4.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-17 05:17:36 UTC
README
This is a composer-plugin that installs CaptainHook and the corresponding git hooks. For more information visit its Website.
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.
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!