| 1 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | package Dist::Zilla::App::Command::issues; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | # vim: set ts=8 sts=4 sw=4 tw=115 et : | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | # ABSTRACT: Print the count of outstanding RT and github issues for your distribution | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | our $VERSION = '0.011'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Dist::Zilla::App -command; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 0 | ▶ | sub abstract { "print your distribution's count of outstanding RT and github issues" } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
abstract: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | sub opt_spec | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
opt_spec: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 2 | [ 'all!' => 'check both RT and github, regardless of plugin configuration' ], | |||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | [ 'rt!' => 'get RT information', { default => 1 } ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | [ 'github!' => 'get github information', { default => 1 } ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | [ 'colour|color!' => 'Uses L<Term::ANSIColor> to colour-code the results according to severity', { default => 1 } ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | [ 'repo=s' => 'URL of the github repository' ], | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | sub execute | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 2 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
execute: called CC=9 SCAR=23.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 2 | my ($self, $opt) = @_; # $arg | |||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 2 | ▶ | $self->app->chrome->logger->mute unless $self->app->global_options->verbose; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | # parse dist.ini and load, instantiate all plugins | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | 2 | my $zilla = $self->zilla; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 2 | $self->app->chrome->logger->unmute; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 2 | require List::Util; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 2 | ▶ | my $plugin = List::Util::first { $_->isa('Dist::Zilla::Plugin::CheckIssues') } @{ $zilla->plugins }; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 2 | ▶ | if (not $plugin) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 2 | require Dist::Zilla::Plugin::CheckIssues; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 2 | ▶ | $plugin = | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition33%2/6
$opt->all or $opt->rt
$opt->all or $opt->github
MC/DC0%0/2
$opt->all or $opt->rt
$opt->all
$opt->rt
MC/DC0%0/2
$opt->all or $opt->github
$opt->all
$opt->github
Truth table33%1/3
A or B
A= $opt->allB= $opt->rt
Truth table33%1/3
A or B
A= $opt->allB= $opt->github
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | Dist::Zilla::Plugin::CheckIssues->new( | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | zilla => $zilla, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | plugin_name => 'issues_command', | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | rt => ($opt->all || $opt->rt ? 1 : 0), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | github => ($opt->all || $opt->github ? 1 : 0), | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | colour => $opt->colour, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | 2 | ▶ | $plugin->repo_url($opt->repo) if $opt->repo; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | 2 | my @issues = $plugin->get_issues; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 2 | $self->log($_) foreach @issues; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||