https://github.com/amansilla/git-hooks-composer-installer
This composer plugin helps you automate the installation git side hooks.
https://github.com/amansilla/git-hooks-composer-installer
automation composer git git-hooks hook-manager hooks plugin
Last synced: about 1 year ago
JSON representation
This composer plugin helps you automate the installation git side hooks.
- Host: GitHub
- URL: https://github.com/amansilla/git-hooks-composer-installer
- Owner: amansilla
- License: mit
- Created: 2016-06-21T09:51:23.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2018-04-16T22:57:14.000Z (about 8 years ago)
- Last Synced: 2025-03-23T23:11:47.516Z (over 1 year ago)
- Topics: automation, composer, git, git-hooks, hook-manager, hooks, plugin
- Language: PHP
- Homepage:
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Git Hooks Composer Installer
===========================
[](https://travis-ci.org/amansilla/git-hooks-composer-installer)
[](https://ci.appveyor.com/project/amansilla/git-hooks-composer-installer/branch/master)
[](https://packagist.org/packages/ams/git-hooks-installer)
[](https://packagist.org/packages/ams/git-hooks-installer)
[](https://scrutinizer-ci.com/g/amansilla/git-hooks-composer-installer/?branch=master)
[](https://insight.sensiolabs.com/projects/c1015283-d2e4-49b6-8094-b3187873e50e)
[](https://packagist.org/packages/ams/git-hooks-installer)
Latest release: [1.0.0](https://packagist.org/packages/ams/git-hooks-installer#1.0.0)
This plugin helps you automate the installation git hooks using [composer](https://getcomposer.org/).
Installation
------------
Just run the following command:
$ composer require --dev ams/git-hooks-installer
or if you prefer add the following to the `composer.json` file:
{
"require-dev": {
"ams/git-hooks-installer": "^1.0"
},
"extra": {
"git-root-dir": "."
}
}
Usage
-----
When the git-hooks-composer installer is run, it only looks for git-hooks among your project dependencies. If your package
is a git hook and you want it to be installed with composer automatically you'll need to define a `composer.json` as follows:
{
"type": "git-hook"
}
The git hooks scripts should be located in the package root directory.
Currently are the following git hooks supported:
* `applypatch-msg`
* `pre-applypatch`
* `post-applypatch`
* `pre-commit`
* `prepare-commit-msg`
* `commit-msg`
* `post-commit`
* `pre-rebase`
* `post-checkout`
* `post-merge`
* `pre-push`
* `pre-auto-gc`
* `post-rewrite`
You can find any additional information about the git hooks on the [git documentation] online.
Contribute
----------
Contributions to are very welcome!
* Report any bugs or issues you find on the [issue tracker].
Support
-------
If you are having problems, send a mail to contact@amansilla.com or just write me [@flamingek] on Twitter.
License
-------
All contents of this package are licensed under the [MIT license].
[issue tracker]: https://github.com/amansilla/git-hooks-composer-installer/issues
[MIT license]: LICENSE
[@flamingek]: https://twitter.com/flamingek
[git documentation]: https://git-scm.com/docs/githooks