Skip to content

Commit

Permalink
fetch stars and watchers from github
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Oct 21, 2024
1 parent d1cd682 commit 5bda863
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/MetaCPAN/Script/Tickets.pm
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ RELEASE: while ( my $release = $scroll->next ) {
closedPullRequests: pullRequests(states: [CLOSED, MERGED]) {
totalCount
}
watchers: watchers {
totalCount
}
stargazerCount: stargazerCount
}
}
END_QUERY
Expand All @@ -157,6 +161,7 @@ END_QUERY
= "[$release->{distribution}] $error->{message}";
if ( $error->{type} eq 'NOT_FOUND' ) {
delete $dist_summary->{'bugs'}{'github'};
delete $dist_summary->{'repo'}{'github'};
log_info {$log_message};
}
else {
Expand All @@ -183,6 +188,10 @@ END_QUERY
source => $source,
};

$dist_summary->{'repo'}{'github'} = {
stars => $repo_data->{stargazerCount},
watchers => $repo_data->{watchers}{totalCount},
};
}

log_info {"writing github data"};
Expand Down

0 comments on commit 5bda863

Please sign in to comment.