Dist-Zilla-PluginBundle-Codeberg

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/PluginBundle/Codeberg.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(
      [
         'Codeberg::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,
         }
      ],

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

__PACKAGE__->meta->make_immutable;

1;

=pod

=encoding UTF-8

=head1 NAME

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

=head1 VERSION

version 2.0100

=head1 SYNOPSIS

Configure git with your Codeberg credentials:

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

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

    login LoginName
    token AccessToken

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

then, in your F<dist.ini>:

    [@Codeberg]
    repo = SomeRepo

=head1 DESCRIPTION

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

=head1 ATTRIBUTES

=over

=item C<bugs>

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

=item C<fork>

If the repository is a Codeberg 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 Codeberg homepage field will be set to the metacpan.org distribution URL
(e.g. C<https://metacpan.org/release/Dist-Zilla-Plugin-Codeberg>) 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 Codeberg 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 Codeberg homepage field will be set to the p3rl.org shortened URL
(e.g. C<https://p3rl.org/Dist::Zilla::PluginBundle::Codeberg>) if this option is set to true (default is
false).

=item C<remote>



( run in 2.446 seconds using v1.01-cache-2.11-cpan-140bd7fdf52 )