Skip to content

Fix Repository Pagination to Prevent Rate Limit Exhaustion#8250

Open
iqb430 wants to merge 1 commit into
JhaSourav07:mainfrom
iqb430:fix-repo-pagination-new
Open

Fix Repository Pagination to Prevent Rate Limit Exhaustion#8250
iqb430 wants to merge 1 commit into
JhaSourav07:mainfrom
iqb430:fix-repo-pagination-new

Conversation

@iqb430

@iqb430 iqb430 commented Jul 21, 2026

Copy link
Copy Markdown

Fixes #911.

Changes:

  • Removed MAX_PAGES looping in fetchReposUncached.
  • Fetch restricted to a single page (100 repos sorted by pushed).
  • Prevents sequential blocking & GitHub PAT exhaustion for high-repo users.

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@iqb430 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@retenta-bot

retenta-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

This PR effectively resolves the issue of rate limit exhaustion by capping the repository pagination. It aligns with previous decisions made to optimize repository fetching and prevent sequential blocking. Thank you for your contribution! Looking forward to your further input.

@retenta-bot retenta-bot Bot changed the title fix: cap repo pagination to prevent rate limit exhaustion (#911) Fix Repository Pagination to Prevent Rate Limit Exhaustion Jul 21, 2026
@github-actions github-actions Bot added the status:blocked This PR is blocked due to a failing CI check. label Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Hey @iqb430, the CI Pipeline is failing on this PR and it has been marked as status:blocked.

Please fix the issues before this can be reviewed. Here's how:

1. Run checks locally before pushing:

npm run format:check   # Check Prettier formatting
npm run lint           # Run ESLint
npm run typecheck      # TypeScript type check
npm run test           # Run unit tests (Vitest)
npm run build          # Verify production build passes

2. Auto-fix common issues:

npm run format         # Auto-fix formatting with Prettier
npm run lint -- --fix  # Auto-fix lint errors where possible

3. Check the full failure log here:
👉 View CI Run

Once you push a fix and the CI passes, the status:blocked label will be removed automatically. 💪

@Aamod007 Aamod007 added level:beginner Small changes Usually isolated fixes or simple UI/text updates. type:refactor Code changes that neither fix a bug nor add a feature mentor:Aamod007 labels Jul 23, 2026

@Aamod007 Aamod007 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This PR is currently blocked due to failing CI checks. It looks like removing the repository pagination logic in \lib/github.ts\ caused \lib/github.test.ts\ to fail because the tests expect \guardedFetch\ to be called multiple times for users with more than 100 repositories.

How to fix:
To fix this error, you need to either:

  1. Restore the pagination logic so that we fetch all repositories (not just the first 100).
  2. Or, if removing pagination is intentional, update the test cases in \lib/github.test.ts\ (around lines 845-903) to expect only 1 fetch call instead of 3.

I am requesting changes until the CI passes.

Label Justification:

  • \level:beginner: 1 file changed.
  • \ ype:refactor: Modifies repository fetching logic.
  • \mentor:Aamod007: Assigned as required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 status:blocked This PR is blocked due to a failing CI check. type:refactor Code changes that neither fix a bug nor add a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fetchUserRepos can make up to 10,000 sequential API calls — exhausts GitHub PAT rate limit

2 participants