Time to github quota reset displayed
Opened by @bahartl · Assignees: None
Solve & Merge Reward: Up to +210 XP & +60 Coins
+30 XP on PR open · +180 XP & +60 coins on merge
Claim Status & GitHub Signal
Unassigned, with 1 comment. Unassigned does not guarantee unclaimed—read comments and linked PRs first.
Estimated from issue labels (enhancement, good first issue), QML context, and discussion depth. There are 1 GitHub comments to review for maintainer clarifications. Note: this is an estimate, not a guarantee.
What It's About
Time to github quota reset displayed. When github gets tied up with too many requests from the test app, would be great if at least in the terminal if it could at least display how many more minutes there is to go until it gets freed up (if not have a gui popup that's easier to see). This command
Why It Matters
Resolving #139 improves reliability and developer experience in OpenwaterHealth/openmotion-test-app.
Expected Outcome
A focused pull request addressing #139 with relevant checks or tests verified locally.
Log in to compare this issue's requirements against your profile skills. Required concepts: HTTP & REST APIs, CLI & Shell.
Progressive AI Hints
Hint #1 is always free and calibrated to your experience level. Extra hints unlock with coins without spoiling the full solution.
Skill-Gap Learning
Issue Description
When github gets tied up with too many requests from the test app, would be great if at least in the terminal if it could at least display how many more minutes there is to go until it gets freed up (if not have a gui popup that's easier to see).
This command seemed to work for me in Windows:
powershell -Command "$r = (Invoke-RestMethod '[https://api.github.com/rate_limit').resources.core](https://api.github.com/rate_limit%27%29.resources.core); $reset = [DateTimeOffset]::FromUnixTimeSeconds($r.reset).LocalDateTime; $mins = [math]::Max(0, [math]::Round(($reset - (Get-Date)).TotalMinutes, 1)); Write-Host ('Remaining: ' + $r.remaining + ' | Resets at: ' + $reset + ' | Wait: ' + $mins + ' mins')"
And this command seemed to work for me on my Mac (I know test app isn't supported but may not hurt to also transfer this to the main app so that end users know how long to wait before it the feature comes back online?):
curl -s "https://api.github.com/rate_limit" | python3 -c "import sys, json, time; r = json.load(sys.stdin)['resources']['core']; mins = max(0, round((r['reset'] - time.time()) / 60, 1)); print(f'Remaining: {r[\"remaining\"]} | Wait: {mins} minutes')"
Linked Pull Requests (0)
No linked or cross-referenced pull requests detected via GitHub timeline. Check comments below for informal claims before starting.
GitHub Comments (1)
Thanks @bahartl, this is a really useful catch. Not knowing how long to wait when the app gets rate-limited is frustrating, and the Windows and Mac one-liners make it easy to reproduce and check.
A few thoughts on how we could build it in:
- Read the reset time from responses we already get. Every GitHub API response includes
X-RateLimit-RemainingandX-RateLimit-Resetheaders. When we hit a 403/429, the app can readX-RateLimit-Resetand show something like "GitHub request limit reached, try again in ~X minutes" in the terminal, and ideally in a GUI popup too. That avoids a separate shell call. (If we do want to check ahead of time,GET /rate_limitworks and doesn't count against the quota.) - Look at the root cause. Unauthenticated requests are capped at 60/hour, while authenticated ones get 5,000/hour. If we can safely use a token for these calls, most lockouts might go away entirely, and the countdown becomes a fallback.
- Bring it to the main app. Agreed that end users would benefit too. I'll open a linked issue in the main app repo so it's tracked there as well.
I'm tagging this as enhancement / good first issue since it's nicely scoped. If anyone in the community wants to pick it up, comment here and we'll help you get started.
Issue Troubleshooting Threads (0)
No troubleshooting threads opened for this issue yet. If you hit a test, build, or navigation blocker, post what you've tried so fellow contributors can help.
PR Verification & Rewards
Sign in and link GitHub to verify your PR against this issue and earn XP + coins.
Contribution Workflow
Track your local progress before opening a pull request on GitHub.
Repository Context
Top Repository Paths
Advisory PR Assistant
Helps structure your PR description or unpack reviewer feedback. Does not perform GitHub actions.