Skip to content

Stabilize GitHub API rate limits with token caching and GraphQL migration#90

Merged
stylessh merged 1 commit intomainfrom
stylessh/stabilize-gh-rate
Apr 13, 2026
Merged

Stabilize GitHub API rate limits with token caching and GraphQL migration#90
stylessh merged 1 commit intomainfrom
stylessh/stabilize-gh-rate

Conversation

@stylessh
Copy link
Copy Markdown
Owner

Summary

  • GraphQL migration: Migrated core search queries (pulls, issues, reviews) from REST to GraphQL, significantly reducing rate-limit cost per request
  • Installation token caching: Added in-memory + KV caching for GitHub App installation tokens with automatic refresh and invalidation via webhooks
  • Rate-limit observability: Added rate-limit header logging on every GitHub API response (success and error) with token labels for debugging
  • Webhook revalidation expansion: Added repoMeta signal key and expanded create/delete/push events to trigger broader cache invalidation
  • Simplified client-side refresh: Replaced use-github-revalidation hook with a leaner signal-based use-github-signal-refresh hook

Test plan

  • Verify pulls, issues, and reviews pages load correctly with GraphQL queries
  • Confirm installation token caching works (check logs for cache hits)
  • Validate webhook-driven cache invalidation on push/PR/issue events
  • Monitor rate-limit logs to confirm reduced API consumption

…GraphQL migration

Migrate core search queries (pulls, issues, reviews) from REST to GraphQL for
lower rate-limit cost. Cache GitHub App installation tokens in memory and KV with
automatic refresh. Add rate-limit header logging, expand webhook revalidation
signals, and simplify client-side refresh to a signal-based hook.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
diffkit ae1c83d Commit Preview URL

Branch Preview URL
Apr 13 2026, 05:37 PM

@stylessh stylessh merged commit b3de9ba into main Apr 13, 2026
4 checks passed
stylessh added a commit that referenced this pull request Apr 18, 2026
…GraphQL migration (#90)

Migrate core search queries (pulls, issues, reviews) from REST to GraphQL for
lower rate-limit cost. Cache GitHub App installation tokens in memory and KV with
automatic refresh. Add rate-limit header logging, expand webhook revalidation
signals, and simplify client-side refresh to a signal-based hook.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant