Skip to content

fix(github): fix GitHub star count showing 0 due to API rate limiting#4889

Closed
fdelbrayelle wants to merge 1 commit into
kestra-io:mainfrom
fdelbrayelle:fix/github-stars-rate-limit
Closed

fix(github): fix GitHub star count showing 0 due to API rate limiting#4889
fdelbrayelle wants to merge 1 commit into
kestra-io:mainfrom
fdelbrayelle:fix/github-stars-rate-limit

Conversation

@fdelbrayelle
Copy link
Copy Markdown
Member

@fdelbrayelle fdelbrayelle commented May 28, 2026

Summary

  • GitHub API calls were unauthenticated, capped at 60 req/hr per server IP — easily exhausted in production
  • On non-404 errors the handler logged but continued, potentially serving stale/zero data
  • Added optional GITHUB_TOKEN support via Astro's env schema to authenticate requests (raises limit to 5000/hr)
  • Fixed the error fallthrough: non-404 errors now return defaultValues immediately

Deployment step required

Add GITHUB_TOKEN as a secret env var in Cloudflare Pageskestra-io project → Settings → Environment variables.
Use the value of the existing GH_READ_ORG_TOKEN org secret.

Test plan

  • Add GITHUB_TOKEN to Cloudflare Pages env vars
  • Redeploy and confirm star count renders correctly on kestra.io homepage

🤖 Generated with Claude Code

@fdelbrayelle fdelbrayelle requested review from a team and flcarre May 28, 2026 18:28
@fdelbrayelle fdelbrayelle self-assigned this May 28, 2026
…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.
@fdelbrayelle
Copy link
Copy Markdown
Member Author

Closing in favor of a new PR from the main repo branch to fix CI (fork PRs don't have access to Cloudflare secrets).

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