logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Dist::Zilla::Role::GitConfig - Easy role to add git_config option to most plugins

Author

       Brendan Byrd <BBYRD@CPAN.org>

Availability

       The project homepage is <https://github.com/SineSwiper/Dist-Zilla-Plugin-Config-Git>.

       The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit
       <http://www.perl.com/CPAN/> to find a CPAN site near you, or see
       <https://metacpan.org/module/Dist::Zilla::Plugin::Config::Git/>.

Description

       This is an easy-to-use role for plugins to enable usage of Config::Git configurations.

Name

       Dist::Zilla::Role::GitConfig - Easy role to add git_config option to most plugins

Requirements

_git_config_mapping
       Hashref of option to errf string mappings.

       The mappings don't work for "allow_dirty".  These are (currently) hardcoded to map to "allow_dirty" and
       "allow_dirty_match" options directly.

Synopsis

           package Dist::Zilla::Plugin::GitReleasePlugin;

           use Moose;

           with 'Dist::Zilla::Role::BeforeRelease';
           with 'Dist::Zilla::Role::GitConfig';

           sub _git_config_mapping { +{
              push_to   => '%{remote}s %{local_branch}s:%{remote_branch}s',
              changelog => '%{changelog}s',
           } }

See Also