Dist-Zilla-PluginBundle-GitLab

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/PluginBundle/GitLab.pm  view on Meta::CPAN

   is      => 'ro',
   isa     => 'Maybe[Str]',
   lazy    => 1,
   default => sub {
      defined $_[0]->payload->{remote} ? $_[0]->payload->{remote} : 'origin';
   },
);

has wiki => (
   is      => 'ro',
   isa     => 'Bool',
   lazy    => 1,
   default => sub {
      defined $_[0]->payload->{wiki} ? $_[0]->payload->{wiki} : 0;
   },
);

sub configure {
   my $self = shift;

   $self->add_plugins(
      [
         'GitLab::Meta' => {
            bugs      => $self->bugs,
            fork      => $self->fork,
            metacpan  => $self->metacpan,
            meta_home => $self->meta_home,
            p3rl      => $self->p3rl,
            remote    => $self->remote,
            repo      => $self->repo,
            wiki      => $self->wiki,
         }
      ],

      [
         'GitLab::Update' => {
            repo => $self->repo,
         }
      ]
   );
}

__PACKAGE__->meta->make_immutable;

1;

=pod

=encoding UTF-8

=head1 NAME

Dist::Zilla::PluginBundle::GitLab - Access GitLab functionality to maintain distros from Dist::Zilla

=head1 VERSION

version 1.0002

=head1 SYNOPSIS

Configure git with your GitLab credentials:

    $ git config --global gitlab.user LoginName
    $ git config --global gitlab.token AccessToken

Alternatively you can install L<Config::Identity> and write your credentials
in the (optionally GPG-encrypted) C<~/.gitlab> file as follows:

    login LoginName
    token AccessToken

Set up an access token on GitLab, in your profile under "Personal Access Tokens." You
must grant the token the C<api> scope!

then, in your F<dist.ini>:

    [@GitLab]
    repo = SomeRepo

=head1 DESCRIPTION

This bundle automatically adds the plugins
L<GitLab::Meta|Dist::Zilla::Plugin::GitLab::Meta>
and L<GitLab::Update|Dist::Zilla::Plugin::GitLab::Update>.

=head1 ATTRIBUTES

=over

=item C<bugs>

The META bugtracker web field will be set to the issue's page of the repository
on GitLab, if this options is set to true (default) and if the GitLab Issues happen to
be activated (see the GitLab repository's C<Admin> panel).

=item C<fork>

If the repository is a GitLab fork of another repository this option will make
all the information be taken from the original repository instead of the forked
one, if it's set to true (default).

=item C<metacpan>

The GitLab homepage field will be set to the metacpan.org distribution URL
(e.g. C<https://metacpan.org/release/Dist-Zilla-Plugin-GitLab>) if this option is set to true
(default is false).

This takes precedence over the C<p3rl> options (if both are
true, metacpan will be used).

=item C<meta_home>

The GitLab homepage field will be set to the value present in the dist meta
(e.g. the one set by other plugins) if this option is set to true (default is
false). If no value is present in the dist meta, this option is ignored.

This takes precedence over the C<metacpan> and C<p3rl> options (if all
three are true, meta_home will be used).

=item C<p3rl>

The GitLab homepage field will be set to the p3rl.org shortened URL
(e.g. C<https://p3rl.org/Dist::Zilla::PluginBundle::GitLab>) if this option is set to true (default is
false).

=item C<remote>



( run in 0.521 second using v1.01-cache-2.11-cpan-39bf76dae61 )