App-GitHooks

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

App-GitHooks
============

[![Build Status](https://travis-ci.org/guillaumeaubert/App-GitHooks.svg?branch=master)](https://travis-ci.org/guillaumeaubert/App-GitHooks)
[![Coverage Status](https://coveralls.io/repos/guillaumeaubert/App-GitHooks/badge.svg?branch=master)](https://coveralls.io/r/guillaumeaubert/App-GitHooks?branch=master)
[![CPAN](https://img.shields.io/cpan/v/App-GitHooks.svg)](https://metacpan.org/release/App-GitHooks)
[![License](https://img.shields.io/badge/license-Perl%205-blue.svg)](http://dev.perl.org/licenses/)

`App::GitHooks` is an extensible and easy to configure git hooks framework that
supports many plugins.


OVERVIEW
--------

 * Here's an example of it in action, running the `pre-commit` hook checks before
the commit message can be entered:

	![Successful checks](https://raw.github.com/guillaumeaubert/App-GitHooks/master/img/app-githooks-example-success.png)

 * Here is another example, with a Perl file that fails compilation this time:

	![Failing checks](https://raw.github.com/guillaumeaubert/App-GitHooks/master/img/app-githooks-example-failure.png)


INSTALLATION
------------

1. Install this distribution (with `cpanm` or your preferred CPAN client):

		cpanm App::GitHooks

2. Install the plugins you are interested in (with `cpanm`or your prefered CPAN
   client), as `App::GitHooks` does not bundle them. See the list of plugins
   below, but for example:

		cpanm App::GitHooks::Plugin::BlockNOCOMMIT
		cpanm App::GitHooks::Plugin::DetectCommitNoVerify
		...

3. Go to the git repository for which you want to set up git hooks, and run:

		githooks install

4. Enjoy!


OFFICIALLY SUPPORTED PLUGINS
----------------------------

 * [App::GitHooks::Plugin::BlockNOCOMMIT]
   (https://metacpan.org/pod/App::GitHooks::Plugin::BlockNOCOMMIT)

Prevent committing code with #NOCOMMIT mentions.

 * [App::GitHooks::Plugin::BlockProductionCommits]
   (https://metacpan.org/pod/App::GitHooks::Plugin::BlockProductionCommits)

Prevent commits in a production environment.

 * [App::GitHooks::Plugin::DetectCommitNoVerify]
   (https://metacpan.org/pod/App::GitHooks::Plugin::DetectCommitNoVerify)

Find out when someone uses --no-verify and append the pre-commit checks to the
commit message.

 * [App::GitHooks::Plugin::ForceRegularUpdate]
   (https://metacpan.org/pod/App::GitHooks::Plugin::ForceRegularUpdate)



( run in 0.824 second using v1.01-cache-2.11-cpan-e1769b4cff6 )