NAME

App::GitHooks::Utils - Support functions for App::GitHooks and its plugins.

VERSION

Version 1.9.0

FUNCTIONS

get_project_prefixes()

Get an arrayref of valid project prefixes.

my $project_prefixes = App::GitHooks::Utils::get_project_prefixes( $app );

Arguments:

  • $app

    An App::GitHooks instance.

get_project_prefix_regex()

Return a non-capturing regex that will match all the valid project prefixes.

my $project_prefix_regex = App::GitHooks::Utils::get_project_prefix_regex( $app );

Arguments:

  • $app

    An App::GitHooks instance.

get_ticket_id_from_commit_regex()

Return a regex that will extract a ticket ID from a commit message, if it exists.

my $ticket_id_regex = App::GitHooks::Utils::get_ticket_id_from_commit_regex( $app );

Arguments:

  • $app

    An App::GitHooks instance.

get_ticket_id_from_branch_name()

Return the ticket ID derived from the name of the current branch for this repository.

my $ticket_id = App::GitHooks::Utils::get_ticket_id_from_branch_name( $app );

Arguments:

  • $app

    An App::GitHooks instance.

BUGS

Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/App-GitHooks/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc App::GitHooks::Utils

You can also look for information at:

AUTHOR

Guillaume Aubert, <aubertg at cpan.org>.

COPYRIGHT & LICENSE

Copyright 2013-2017 Guillaume Aubert.

This code is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.