Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1491 +/- ##
==========================================
+ Coverage 63.98% 64.28% +0.29%
==========================================
Files 137 137
Lines 4468 4502 +34
Branches 671 682 +11
==========================================
+ Hits 2859 2894 +35
+ Misses 1352 1349 -3
- Partials 257 259 +2
🚀 New features to boost your workflow:
|
haarg
reviewed
Jun 15, 2026
GitHub star/watcher counts were only fetched for distributions whose bug tracker was GitHub issues. Distributions that use RT (or another tracker) but host their code on GitHub never had their star counts fetched. Broaden the release query to also match resources.repository.url/web, and decouple star fetching from bug counting: stars/watchers are now recorded for any dist with a GitHub repository, while GitHub issue counts remain tied to GitHub being the bug tracker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- _is_github_url now extracts the host via URI::Split and compares it to github.com, instead of a prefix match. This rejects look-alike hosts (github.com.evil.com) and is the requested URI-based parsing. - Guard against a null repository in an otherwise-successful GraphQL response before dereferencing it. - Restrict the git:// scheme to repository URL fields in the release query (bug trackers are always http(s)). - Expand tests for the above; format with precious. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Two fixes: 1. Read release fields from _source. Commit 7c471c0 migrated index_github_bugs from a model scroll (\$release->resources) to a raw Elasticsearch scroll but kept top-level hash access (\$release->{resources}, \$release->{distribution}). Raw ES hits store fields under _source, so both reads returned undef, github_user_repo_from_resources got undef, and every release was skipped -- the script has fetched no GitHub data since that commit. Read from \$release->{_source} like the rest of the codebase. 2. _is_github_url now parses the host with URI->new->host and compares it to github.com. URI::git is added (cpanfile + snapshot) so git:// URLs parse to a host instead of a host-less foreign URI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirrors the guard in check_all_distributions and avoids a wasted GitHub
API call (and a stray $summary{undef} entry) for the unexpected case of a
latest release with no distribution.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The recursive fallback scan returned the first github url it found while iterating values in hash order, making the (user, repo) result non-deterministic. Sort keys so the match is consistent. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N6oJpF2cBxDcSPevtz6n6Z
oalders
marked this pull request as ready for review
September 1, 2026 21:55
precious 0.12 rejects the singular `label` field (expects `labels`), so CI could not load precious.toml at all and Code Formatting failed. A labeled command only runs under an explicit --label, but CI runs bare `precious lint`, so renaming to `labels` would have dropped perltidy from the default run. Remove the label instead so perltidy runs by default alongside perlimports and perlcritic, keeping formatting enforced in CI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N6oJpF2cBxDcSPevtz6n6Z
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1477
Problem
GitHub star/watcher counts were only fetched for distributions whose bug tracker was GitHub issues. A dist that uses RT (or any non-GitHub tracker) but hosts its code on GitHub never had its star count fetched.
While fixing this I found a deeper bug:
index_github_bugshas been a silent no-op since November 2024. Commit 7c471c0 migrated the loop from a model scroll ($release->resources) to a raw Elasticsearchscroll_helperbut kept top-level hash access ($release->{resources},$release->{distribution}). Raw ES hits store fields under_source, so both reads returnedundef, every release was skipped, and no GitHub bug or star data was being updated at all.Changes
_sourceinindex_github_bugs, matchingcheck_all_distributionsand every other script. This restores the feature.resources.repository.url/resources.repository.web, and_github_dist_summaryrecords stars/watchers for any dist with a GitHub repo while recording GitHub issue counts only when GitHub issues are the bug tracker._is_github_urlparses the URL and compares its host togithub.com(viaURI->new->host) instead of a prefix match, rejecting look-alike hosts such asgithub.com.evil.com. AddsURI::git(cpanfile + snapshot) sogit://URLs resolve a host.git://scheme is matched only against repository URL fields (bug trackers are always http(s)).distribution, and skip a nullrepositoryin an otherwise-successful GraphQL response before dereferencing it.Testing
t/script/tickets.tunit tests for the host check, the query filter, and the star-vs-issue decision logic (including the RT-bugtracker-plus-GitHub-repo case that motivates the fix).prove t/script/tickets.t t/script/load.tpasses;precious lintclean (perlimports/perlcritic/perltidy).cpm install --resolver=snapshot URI::gitresolves from the new snapshot stanza.index_github_bugsrun needs a GitHub token and ES release fixtures, which weren't available here. The_sourcefix is verified by consistency with the rest of the codebase rather than an integration test.