Skip to content

Add per_page=100 to contributor breadth events API call#432

Merged
MoralCode merged 1 commit into
chaoss:mainfrom
Dipro-cyber:feat/contributor-breadth-per-page-426
Jun 30, 2026
Merged

Add per_page=100 to contributor breadth events API call#432
MoralCode merged 1 commit into
chaoss:mainfrom
Dipro-cyber:feat/contributor-breadth-per-page-426

Conversation

@Dipro-cyber

Copy link
Copy Markdown
Contributor

Description
The GitHub events API defaults to 30 results per page. This change adds
?per_page=100 to the contributor events URL in the contributor breadth
worker, reducing the number of API calls by ~3x for the same data.

The paginate_resource method follows GitHub's Link header for
subsequent pages, so the per_page param is safely preserved across
all 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

  • Yes, I signed my commits.

Generative AI disclosure

  • This contribution was assisted or created by Generative AI tools.
  • What tools were used? Kiro (Claude-based AI coding assistant)
  • How were these tools used? Draft PR description.
  • Did you review these outputs before submitting this PR? Yes

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>
@Dipro-cyber Dipro-cyber requested a review from MoralCode as a code owner June 30, 2026 11:21

@MoralCode MoralCode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@Dipro-cyber

Copy link
Copy Markdown
Contributor Author

LGTM

Yayaya, can this be merged now sir?

@MoralCode MoralCode merged commit 456f8b4 into chaoss:main Jun 30, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contributor breadth model (events fetching) could be more efficient with requests

2 participants