Skip to content

fix(site): serve the README's dynamic badges from the site - #62

Merged
jamesconwaydev merged 1 commit into
mainfrom
fix-badges-selfhost
Nov 6, 2026
Merged

jamesconwaydev merged 1 commit into
mainfrom
fix-badges-selfhost

Conversation

@jamesconwaydev

Copy link
Copy Markdown
Collaborator

GitHub's image proxy times out (504) on dynamic shields.io badges. This serves the listed and OpenSSF Scorecard badges from the site as self-contained SVGs, and swaps discussions and website for static shields badges.

  • site/src/pages/badge.svg.ts: listed | N repos, brand colour. badge.json still works.
  • site/src/pages/scorecard.svg.ts: fetched at build time (10s timeout), green >= 7, yellow >= 4, red below, grey pending on any failure.
  • README badges updated. PR checks and license untouched.
  • Tests in site/tests/badges.test.mjs.
  • The deploy build job's harden-runner is in audit mode, so the scorecard fetch is not blocked. The hourly redeploy refreshes the score.

GitHub's image proxy times out on dynamic shields.io badges. The listed
and Scorecard badges are now SVGs built with the site (badge.svg,
scorecard.svg); discussions and website are static shields badges.
Scorecard is fetched at build time with a 10s timeout and falls back to
a grey "pending" badge. badge.json is unchanged. The build job's
harden-runner is in audit mode, so egress to api.scorecard.dev is open.
@jamesconwaydev
jamesconwaydev merged commit 1704c34 into main Nov 6, 2026
7 of 8 checks passed
@jamesconwaydev
jamesconwaydev deleted the fix-badges-selfhost branch November 6, 2026 02:51
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