Skip to content

fix(repos): paginate repo-explorer to fetch all repos beyond 100 limit (#2843)#3133

Open
BCA-krishna wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
BCA-krishna:fix/issue-2843-repo-pagination
Open

fix(repos): paginate repo-explorer to fetch all repos beyond 100 limit (#2843)#3133
BCA-krishna wants to merge 1 commit into
Priyanshu-byte-coder:mainfrom
BCA-krishna:fix/issue-2843-repo-pagination

Conversation

@BCA-krishna

Copy link
Copy Markdown
Contributor

Closes #2843

Problem

The repo-explorer endpoint called /user/repos?per_page=100 once,
returning at most 100 repositories. Users with more than 100 repos
saw an incomplete list on the dashboard, and metrics derived from
that list (PR counts, streak) were also incomplete.

Fix

  • Replaced the single fetch() call in repo-explorer/route.ts with
    the existing fetchUserRepos() helper from src/lib/github.ts, which
    already paginates up to 10 pages (1000 repos maximum).
  • Added missing created_at and language fields to the GitHubRepo
    interface so the type accurately reflects the GitHub API response.
  • Updated test mock objects to include the new required fields.

Testing

  • npm run type-check — 0 errors
  • npm run lint — 0 errors

The repo-explorer endpoint was calling /user/repos?per_page=100 once,
returning at most 100 repositories. Users with more than 100 repos
saw an incomplete list on the dashboard.

Changes:
- Replace single fetch in repo-explorer/route.ts with fetchUserRepos()
  which already paginates up to 10 pages (1000 repos max) using the
  existing pagination helper in src/lib/github.ts
- Add missing created_at and language fields to GitHubRepo interface
  so the type accurately reflects the GitHub API response shape
- Update test/github.test.ts mock objects to include the new fields

Closes Priyanshu-byte-coder#2843
@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:testing GSSoC type bonus: tests (+10 pts) labels Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@github-actions github-actions Bot added type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) labels Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:bug GSSoC type bonus: bug fix type:feature GSSoC type bonus: new feature type:performance GSSoC type bonus: performance (+15 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Repository list fetches all repos in a single API call with no pagination, causing failures for users with more than 100 repositories

1 participant