App-GitHooks

 view release on metacpan or  search on metacpan

lib/App/GitHooks.pm  view on Meta::CPAN

package App::GitHooks;

use strict;
use warnings;

# Unbuffer output to display it as quickly as possible.
local $| = 1;

# External dependencies.
use Carp qw( carp croak );
use Class::Load qw();
use Config::Tiny qw();
use Data::Validate::Type qw();
use Data::Dumper qw( Dumper );
use File::Basename qw();
use Git::Repository qw();
use Module::Pluggable
	require  => 1,
	sub_name => '_search_plugins';
use Term::ANSIColor qw();
use Text::Wrap qw();
use Try::Tiny qw( try catch finally );
use Storable qw();

# Internal dependencies.
use App::GitHooks::Config;
use App::GitHooks::Constants qw( :HOOK_EXIT_CODES );
use App::GitHooks::Plugin;
use App::GitHooks::StagedChanges;
use App::GitHooks::Terminal;


=head1 NAME

App::GitHooks - Extensible plugins system for git hooks.


=head1 VERSION

Version 1.9.0

=cut

our $VERSION = '1.9.0';


=head1 DESCRIPTION

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

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

=begin html

<div><img src="https://raw.github.com/guillaumeaubert/App-GitHooks/master/img/app-githooks-example-success.png"></div>

=end html

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

=begin html

<div><img src="https://raw.github.com/guillaumeaubert/App-GitHooks/master/img/app-githooks-example-failure.png"></div>

=end html


=head1 SYNOPSIS

=over 4

=item 1.

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

	cpanm App::GitHooks

=item 2.

Install the plugins you are interested in (with cpanm or your prefered CPAN
client), as C<App::GitHooks> does not bundle them. See the list of plugins



( run in 1.418 second using v1.01-cache-2.11-cpan-d8267643d1d )