Skip to content

extractContributionProfile's label fetch never follows pagination past 100 labels #8010

Description

@JSONbored

Context

packages/loopover-miner/lib/contribution-profile-extract.ts's getJson (line 102) issues exactly one fetchWithRetry call for .../labels?per_page=100 (lines 259-264), with no Link-header pagination follow-up — unlike other GitHub list-endpoint readers in this same package (e.g. ci-poller.ts's check-run polling, self-review-context.ts's manifest fetch), which do page through results.

A repo with more than 100 labels will silently have its 101st+ label dropped from eligibility/exclusion classification in extractContributionProfile — a real "good first issue"-equivalent label sitting past page 1 makes the profile wrongly report that signal as absent rather than reflecting the repo's true label state.

⚠️ Required pattern — mirror this package's existing paginated-list convention (e.g. as used by ci-poller.ts's check-run polling) rather than inventing a new pagination approach. Follow Link headers (or equivalent) until exhausted.

Requirements

  • The labels fetch in contribution-profile-extract.ts must follow pagination and collect every label on the repo, not just the first 100.
  • No behavior change for repos with ≤100 labels.

Deliverables

  • Label fetch pages through all results for repos with >100 labels.
  • Existing behavior for repos with ≤100 labels is unchanged (verified by existing tests continuing to pass unmodified).

Test Coverage Requirements

packages/loopover-miner/** — 99%+ Codecov patch target. Add a unit test with a mocked multi-page label response (>100 labels across 2+ pages) asserting all labels are collected, plus the existing single-page case continuing to pass.

Expected Outcome

extractContributionProfile reflects a repo's true label set regardless of how many labels it has, instead of silently truncating at 100.

Links & Resources

  • packages/loopover-miner/lib/contribution-profile-extract.ts (getJson, lines 102 and 259-264)
  • packages/loopover-miner/lib/ci-poller.ts (the pagination convention to mirror)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:bugGittensor-scored bug fix — scores a 0.05x multiplier.help wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions