Skip to content

Commit 5bda863

Browse files
committed
fetch stars and watchers from github
1 parent d1cd682 commit 5bda863

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/MetaCPAN/Script/Tickets.pm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ RELEASE: while ( my $release = $scroll->next ) {
147147
closedPullRequests: pullRequests(states: [CLOSED, MERGED]) {
148148
totalCount
149149
}
150+
watchers: watchers {
151+
totalCount
152+
}
153+
stargazerCount: stargazerCount
150154
}
151155
}
152156
END_QUERY
@@ -157,6 +161,7 @@ END_QUERY
157161
= "[$release->{distribution}] $error->{message}";
158162
if ( $error->{type} eq 'NOT_FOUND' ) {
159163
delete $dist_summary->{'bugs'}{'github'};
164+
delete $dist_summary->{'repo'}{'github'};
160165
log_info {$log_message};
161166
}
162167
else {
@@ -183,6 +188,10 @@ END_QUERY
183188
source => $source,
184189
};
185190

191+
$dist_summary->{'repo'}{'github'} = {
192+
stars => $repo_data->{stargazerCount},
193+
watchers => $repo_data->{watchers}{totalCount},
194+
};
186195
}
187196

188197
log_info {"writing github data"};

0 commit comments

Comments
 (0)