Skip to content

fix(github-stars): authenticate preload and don't fail the build on error - #1281

Merged
LiamRandall merged 1 commit into
mainfrom
fix/github-stars-auth
Oct 2, 2026
Merged

LiamRandall merged 1 commit into
mainfrom
fix/github-stars-auth

Conversation

@LiamRandall

Copy link
Copy Markdown
Member

The production deploy of af7225c (2026-09-30 meeting pages) failed on Netlify with a GitHub API rate-limit 403 from docusaurus-github-stars. The plugin called new Octokit() without auth, so the GITHUB_TOKEN env var set on Netlify was never used, and every build shared the anonymous 60/hour per-IP limit.

  • Pass process.env.GITHUB_TOKEN to Octokit.
  • Catch fetch failures and log a warning instead of failing the build. Star counts are cosmetic, and the client already fetches them at runtime when nothing was preloaded.

Tested: a full npm run build with an invalid token logs [WARNING] Failed to preload repo data … Bad credentials and completes with [SUCCESS].

Merging this triggers a production deploy, which publishes the 9/30 meeting pages.

Co-Authored-By: Claude noreply@anthropic.com

@LiamRandall
LiamRandall requested a review from a team as a code owner October 2, 2026 22:42
@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dreamy-golick-5f201e ready!

Name Link
🔨 Latest commit 568c7a1
🔍 Latest deploy log https://app.netlify.com/projects/dreamy-golick-5f201e/deploys/6ac034bb8ba167000856088e
😎 Deploy Preview https://deploy-preview-1281--dreamy-golick-5f201e.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

🔎 Structured data validation

  • Mode: PR-incremental (base: origin/main)
  • Files checked: 0
  • JSON-LD payloads: 0
  • Errors: 0
  • Warnings: 0

✅ All checks pass and no authoring warnings to backfill.

⚙️ Generated by ci_structured_data.yml • structured-data spike

…rror

The plugin called the GitHub API anonymously, sharing a 60/hour limit
per IP with every other build on the Netlify machine. Rate-limit 403s
failed the production build for af7225c, so the 2026-09-30 meeting
pages never deployed.

Pass GITHUB_TOKEN to Octokit, and treat a failed preload as a warning:
the client already fetches star counts at runtime when nothing was
preloaded.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Liam Randall <liam@cosmonic.com>
@LiamRandall
LiamRandall force-pushed the fix/github-stars-auth branch from a2b33af to 568c7a1 Compare October 2, 2026 22:48
@LiamRandall

Copy link
Copy Markdown
Member Author

Fixing CI upstream

@LiamRandall
LiamRandall enabled auto-merge (rebase) October 2, 2026 22:49
@LiamRandall
LiamRandall merged commit d41b69e into main Oct 2, 2026
8 checks passed
@LiamRandall
LiamRandall deleted the fix/github-stars-auth branch October 2, 2026 22:53
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.

2 participants