fix(github): authenticate API calls to fix rate-limited star count showing 0#4891
Closed
fdelbrayelle wants to merge 1 commit into
Closed
fix(github): authenticate API calls to fix rate-limited star count showing 0#4891fdelbrayelle wants to merge 1 commit into
fdelbrayelle wants to merge 1 commit into
Conversation
…owing 0 Unauthenticated GitHub API calls are capped at 60 req/hr per IP — easily exhausted in production. Add optional GITHUB_TOKEN support via Astro's env schema to raise the limit to 5000/hr. Also fix the error fallthrough: on non-404 errors the handler logged but continued, risking stale/zero data; now returns defaultValues immediately. Add GITHUB_TOKEN as a secret env var in Cloudflare Pages → kestra-io project → Settings → Environment variables. Use the value of GH_READ_ORG_TOKEN.
Member
Author
Contributor
☁️ Cloudflare Worker Preview Deployed!🔗 https://ks-fix-github-stars-rate-limit-docs.kestra-io.workers.dev ## 🔦 Lighthouse Benchmark
Scores (0–100, higher is better)
Core Web Vitals (lower is better)
Legend🟢 improved · 🔻 regressed · (blank) no significant change |
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.
Summary
GITHUB_TOKENsupport via Astro'senvschema to authenticate requests (raises limit to 5000/hr)defaultValuesimmediatelyDeployment step required
Add
GITHUB_TOKENas a secret env var in Cloudflare Pages →kestra-ioproject → Settings → Environment variables.Use the value of the existing
GH_READ_ORG_TOKENorg secret.Test plan
GITHUB_TOKENto Cloudflare Pages env vars🤖 Generated with Claude Code