Skip to content

feat: implement contributors list pagination handling (#42)#72

Open
MayurKharat0390 wants to merge 1 commit into
abhro05:mainfrom
MayurKharat0390:feat/contributors-pagination
Open

feat: implement contributors list pagination handling (#42)#72
MayurKharat0390 wants to merge 1 commit into
abhro05:mainfrom
MayurKharat0390:feat/contributors-pagination

Conversation

@MayurKharat0390

Copy link
Copy Markdown
Contributor

Summary

This PR addresses issue #42 by introducing recursive, page-by-page fetching to the GitHub Contributors list API call in src/pages/Contributors.jsx. This ensures the application displays the complete list of contributors for repositories with more than 30 contributors.

Key Changes

  • Paginated Fetching Loop (Contributors.jsx):
    • Created a traversal loop fetching per_page=100 contributors at a time.
    • Accumulates records dynamically page-by-page.
    • Loops until it encounters a page with fewer than 100 contributors or reaches a safety cap of 5 pages (500 contributors max) to prevent API rate limiting crashes.
    • Caches the entire consolidated array.

Verification & Testing

  • Vite Build: Confirmed npm run build compiles successfully.
  • Pagination Mocking: Verified that lists spanning more than 30 items aggregate all pages correctly before updating states and storage caches.

@abhro05

abhro05 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

@MayurKharat0390 Please resolve the conflicts and tag me!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants