fix: surface GitHub API rate limit errors on dashboard#2012
Conversation
|
@bhavyajain0810 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
Hi @Priyanshu-byte-coder, I have opened a PR for the issue #1072 The PR adds GitHub rate-limit detection, returns a structured PR: #2012 Thank you! |
|
Hi @Priyanshu-byte-coder, I have updated this branch with the latest The branch seems to be becoming out-of-date repeatedly because new commits are being added to I have already verified the relevant local checks for this PR, and the remaining pending workflow/status check appears to require maintainer/workflow approval. For this PR, I verified:
Thank you! |
|
🎉 Merged! Thanks for contributing to DevTrack. If the project has been useful to you, a ⭐ star on the repo is the easiest way to support it — it helps DevTrack get discovered by more developers. Keep an eye on open issues for your next contribution! |
|
Four of my approved and merged DevTrack PRs are still not appearing on either my official GSSoC profile or the community PR tracker, even though it has been more than a week:
All four PRs were assigned to me, merged, and have the It appears that GSSoC may still have DevTrack registered under the previous repository path, Could you please confirm whether the repository transfer was reported to the GSSoC team and whether the registered repository URL can be updated? This may be preventing PRs merged after the transfer from being tracked. GitHub username: Thank you. |
Summary
Fixed GitHub API rate-limit handling so dashboard users are clearly informed when GitHub rate limits are reached.
This PR detects GitHub
403/429rate-limit responses using thex-ratelimit-remainingandx-ratelimit-resetheaders, returns a structuredGITHUB_RATE_LIMITEDAPI response, and displays a dashboard toast with the reset time.Closes #1072
Type of Change
Changes Made
429responses with:error: "GITHUB_RATE_LIMITED"sonnertoast401session-expiry handlingHow to Test
Steps for the reviewer to verify this works:
npm run lintnpm run type-checknpx vitest run test/github-fetch.test.ts test/ContributionGraph.test.tsGITHUB_RATE_LIMITEDresponseScreenshots (if UI change)
N/A
The change is mainly API/error-handling related. The dashboard now shows a toast when a GitHub rate-limit response is received.
Checklist
npm run lintpasses locallynpm run type-check)Test Note
The full
npm run testsuite currently has unrelated baseline failures in existing test files. I verified this before implementing the issue changes.Relevant targeted checks pass:
npm run lintnpm run type-checknpx vitest run test/github-fetch.test.ts test/ContributionGraph.test.tsAccessibility Checklist
sonnersystemAdditional Notes
This PR keeps the fix focused on GitHub rate-limit detection, structured API responses, and dashboard-level user feedback without modifying unrelated dashboard widgets or existing session handling.