Skip to content

fix(contributors): tolerate search results exceeding the 1,000 cap - #500

Closed
Eomm wants to merge 1 commit into
mainfrom
fix/contributors-search-cap
Closed

Eomm wants to merge 1 commit into
mainfrom
fix/contributors-search-cap

Conversation

@Eomm

@Eomm Eomm commented Sep 13, 2026

Copy link
Copy Markdown
Member

Problem

The website build fails in CI:

Error: pr search exceeds 1,000 results on 2026-09-01
    at fetchGraphqlSearchRange (scripts/contributors/collect.mjs:118:10)

When a date range returns more than 1,000 results the collector splits it in
half and retries. Once the range is a single day it cannot be split further, so
it threw and aborted the whole build.

Change

Both cap branches (REST commit search and GraphQL PR/issue search) now:

  • log a warning instead of throwing when the range can't be split further;
  • keep the first 1,000 results (pagination stops at the cap);
  • relax the "returned N of M results" completeness assertion for that truncated
    range only — full ranges still fail loudly as before.

The build continues with slightly incomplete contributor data for the offending
day, and the CI log shows why.

When a single-day range still returns more than 1,000 results the range can
no longer be split, which aborted the whole website build. Log a warning and
keep the first 1,000 results instead, relaxing the completeness assertion for
that truncated range only.

@ilteoood ilteoood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1000 is the limit that the GitHub api can return within a single request.
The previous implementation, fixed with #499, included every update and that could easily grow. Now we check only merge and opened PR in a day.

@Eomm Eomm closed this Sep 14, 2026
@Eomm
Eomm deleted the fix/contributors-search-cap branch September 14, 2026 07:53

This branch is waiting to be deployed

1 active and 1 waiting deployments
staging — 2ee27d66 Waiting Sep 13, 2026 by Eomm via deploy-to-staging #179
sandbox — 2ee27d66 Deployed Sep 13, 2026 by Eomm via build-and-upload #179
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants