Add per_page=100 to contributor breadth events API call#432
Merged
MoralCode merged 1 commit intoJun 30, 2026
Merged
Conversation
The GitHub events API defaults to 30 results per page. Adding per_page=100 reduces the number of API calls needed by ~3x when fetching contributor events, making the contributor breadth model more efficient. The paginate_resource method follows GitHub's Link header for pagination, so the per_page param is safely preserved across all pages. Fixes chaoss#426 Signed-off-by: Diptesh Roy <droy88333@gmail.com>
Contributor
Author
Yayaya, can this be merged now sir? |
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.
Description
The GitHub events API defaults to 30 results per page. This change adds
?per_page=100to the contributor events URL in the contributor breadthworker, reducing the number of API calls by ~3x for the same data.
The
paginate_resourcemethod follows GitHub'sLinkheader forsubsequent pages, so the
per_pageparam is safely preserved acrossall pages with no risk of conflicts.
This PR fixes #426
Notes for Reviewers
Single character change in
contributor_breadth_worker.py. No logic changes.Signed commits
Generative AI disclosure