Skip to content

Commit a638c50

Browse files
committed
Script/Tickets code cleanup
1 parent d924853 commit a638c50

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

cpanfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ requires 'IO::Prompt::Tiny';
6767
requires 'IO::Uncompress::Bunzip2', '2.106';
6868
requires 'IO::Zlib';
6969
requires 'IPC::Run3', '0.048';
70-
requires 'JSON::MaybeXS', '1.004004'; # indirect dep
7170
requires 'List::Util', '1.62';
7271
requires 'Log::Any::Adapter';
7372
requires 'Log::Any::Adapter::Log4perl';

lib/MetaCPAN/Script/Tickets.pm

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ use namespace::autoclean;
77
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
88

99
use HTTP::Request::Common qw( GET );
10-
use Log::Contextual qw( :log :dlog );
11-
use Net::GitHub::V4 ();
12-
use Ref::Util qw( is_hashref is_ref );
13-
use Text::CSV_XS ();
14-
use URI::Escape qw( uri_escape );
10+
use Log::Contextual qw( :log :dlog );
11+
use Net::GitHub::V4 ();
12+
use Ref::Util qw( is_hashref is_ref );
13+
use Text::CSV_XS ();
14+
use URI::Escape qw( uri_escape );
1515

1616
with 'MetaCPAN::Role::Script', 'MooseX::Getopt';
1717

@@ -21,12 +21,6 @@ has rt_summary_url => (
2121
default => 'https://rt.cpan.org/Public/bugs-per-dist.tsv',
2222
);
2323

24-
has github_issues => (
25-
is => 'ro',
26-
required => 1,
27-
default => 'https://api.github.com/repos/%s/%s/issues?per_page=100',
28-
);
29-
3024
has github_token => (
3125
is => 'ro',
3226
lazy => 1,
@@ -117,8 +111,6 @@ sub index_github_bugs {
117111

118112
my %summary;
119113

120-
my $json = JSON::MaybeXS->new( allow_nonref => 1 );
121-
122114
RELEASE: while ( my $release = $scroll->next ) {
123115
my $resources = $release->resources;
124116
my ( $user, $repo, $source )
@@ -261,7 +253,7 @@ sub parse_tsv {
261253
source => $self->rt_dist_url( $row->{dist} ),
262254
active => $row->{active},
263255
closed => $row->{inactive},
264-
map { $_ => $row->{$_} + 0 }
256+
map { $_ => $row->{$_} + 0 }
265257
grep { not /^(dist|active|inactive)$/ }
266258
keys %$row,
267259
};
@@ -312,4 +304,3 @@ http://fastapi.metacpan.org/v1/distribution/Moose
312304
http://fastapi.metacpan.org/v1/distribution/HTTP-BrowserDetect
313305
314306
=cut
315-

t/00_setup.t

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,6 @@ ok(
117117
scheme => 'file',
118118
path => $fakecpan_dir->child('bugs.tsv')->absolute->stringify,
119119
),
120-
github_issues => uri(
121-
scheme => 'file',
122-
path => $fakecpan_dir->child('github')->absolute->stringify
123-
. '/%s/%s.json?per_page=100'
124-
),
125120
} )->run,
126121
'tickets'
127122
);

0 commit comments

Comments
 (0)