Dist-Zilla-Plugin-GitHub

 view release on metacpan or  search on metacpan

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

            defined $_[0]->payload->{wiki} ?
                $_[0]->payload->{wiki} : 0
        }
);

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

# GitHub::Update

# deprecated and no longer documented. Use 'metacpan' instead!
has cpan => (
    is      => 'ro',
    isa     => 'Bool',
    lazy    => 1,
    default => sub {
            defined $_[0]->payload->{cpan} ?
                $_[0]->payload->{cpan} : 1
        }
);

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

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

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

#pod =head1 SYNOPSIS
#pod
#pod Configure git with your GitHub credentials:
#pod
#pod     $ git config --global github.user LoginName
#pod     $ git config --global github.password GitHubPassword
#pod
#pod Alternatively you can install L<Config::Identity> and write your credentials
#pod in the (optionally GPG-encrypted) C<~/.github> file as follows:
#pod
#pod     login LoginName
#pod     password GitHubpassword
#pod
#pod (if only the login name is set, the password will be asked interactively)
#pod
#pod then, in your F<dist.ini>:
#pod
#pod     [@GitHub]
#pod     repo = SomeRepo
#pod
#pod =head1 DESCRIPTION
#pod
#pod This bundle automatically adds the plugins
#pod L<GitHub::Meta|Dist::Zilla::Plugin::GitHub::Meta>
#pod and L<[GitHub::Update|Dist::Zilla::Plugin::GitHub::Update>.
#pod
#pod =cut

sub configure {
    my $self = shift;

    $self->add_plugins(
        ['GitHub::Meta' => {
            repo => $self->repo,
            homepage => $self->homepage,
            bugs => $self->bugs,
            wiki => $self->wiki,
            fork => $self->fork
        }],

        ['GitHub::Update' => {
            repo => $self->repo,
            cpan => $self->cpan,
            p3rl => $self->p3rl,
            metacpan  => $self->metacpan,
            meta_home => $self->meta_home,
            prompt_2fa => $self->prompt_2fa
        }]
    );
}

__PACKAGE__->meta->make_immutable;
1; # End of Dist::Zilla::PluginBundle::GitHub

__END__

=pod

=encoding UTF-8

=head1 NAME

Dist::Zilla::PluginBundle::GitHub - GitHub plugins all-in-one

=head1 VERSION

version 0.49

=head1 SYNOPSIS

Configure git with your GitHub credentials:

    $ git config --global github.user LoginName
    $ git config --global github.password GitHubPassword

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

    login LoginName
    password GitHubpassword

(if only the login name is set, the password will be asked interactively)

then, in your F<dist.ini>:

    [@GitHub]
    repo = SomeRepo

=head1 DESCRIPTION

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

=head1 ATTRIBUTES

=over

=item C<repo>

The name of the GitHub repository. By default the name will be extracted from
the URL of the remote specified in the C<remote> option, and if that fails the
dist name (from dist.ini) is used. It can also be in the form C<user/repo>
when it belongs to another GitHub user/organization.

=item C<remote>

The name of the Git remote pointing to the GitHub repository (C<"origin"> by
default). This is used when trying to guess the repository name.

=item C<homepage>

The META homepage field will be set to the value of the homepage field set on
the GitHub repository's info if this option is set to true (default).

=item C<wiki>

The META homepage field will be set to the URL of the wiki of the GitHub
repository, if this option is set to true (default is false) and if the GitHub
Wiki happens to be activated (see the GitHub repository's C<Admin> panel).

=item C<bugs>

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

=item C<fork>

If the repository is a GitHub 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<p3rl>

The GitHub homepage field will be set to the p3rl.org shortened URL



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