Repository navigation
fix: stop GitHub rate-limit lockouts and unblock Vercel deploys - #3528
Merged
Merged
Conversation
Dashboard loads issued ~95 Search API calls against a 30/minute quota, and paging a year of commit search tripped GitHub's secondary (anti-scraping) limit, which then froze every API for the user. - Build the commit timeline from GraphQL (contributionsCollection repo discovery + per-repo default-branch history filtered by author id). No Search API quota is spent and totals now match GitHub's own contribution graph instead of double-counting mirrored commits. - Derive every commit window (streak, consistency, contributions, productive hours, commit times, hourly, weekly summary, repos, languages, repo explorer, repo health, CI) from that one shared, memoized timeline. - Repo health: one GraphQL query per repo replaces four searches. - Request layer: bounded per-resource concurrency instead of strict serialization, per-resource freshness, a short revalidation floor so a forced refresh revalidates shared queries once, and a 429 with remaining=0 is treated as a primary limit for that resource only. - Move the two hourly crons to a GitHub Actions schedule; Vercel Hobby rejects sub-daily crons, which has failed every deploy since Sept 12. Forced refresh of all 24 dashboard endpoints: ~95 -> 15 searches, 0 429s.
…eline Repo and org filters on contributions and top repos now slice the shared commit timeline in memory instead of issuing their own commit searches. This removes the last commit-search fan-out and the user-controlled branch between two fetch paths that CodeQL flagged.
|
🎉 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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
vercel.jsonhad two hourly crons, and Vercel Hobby only allows daily ones.What
contributionsCollectiondiscovers the repos.history(author:)supplies the commits.remaining=0is now scoped to that resource only.goals-syncand weekly webhooks now run from.github/workflows/hourly-jobs.yml, which uses theAPP_URLandCRON_SECRETrepo secrets.Measured
Forced refresh of all 24 dashboard endpoints, local, real account:
Tests
test/commit-timeline-shim.tslets existing route tests keep describing commits as search results.