Skip to content

Repo checker: a "check wheels" badge a project can put in its README - #200

Merged
patrickballard merged 1 commit into
mainfrom
site/checker-badge-188
Nov 21, 2026
Merged

patrickballard merged 1 commit into
mainfrom
site/checker-badge-188

Conversation

@patrickballard

Copy link
Copy Markdown
Contributor

Closes #188

A static "wheelgap | check wheels" badge that a project can put in its README, linking to the repo checker for that repo.

What changed

  • site/check/badge.svg: a hand-written flat badge, 1.1 KB, no script, no external font or image. It is a fixed image and shows no result.
  • badgeMarkdown(repo, lockfile, defaultLock) in check-logic.mjs. The link carries only repo=, never py, t or ref, so a click checks the default branch on its CI's targets that day. &lock=path is added only when the file shown isn't the one pickLockfile() picks for the repo alone. The query is built with URLSearchParams, as toQuery() builds it, so a path can't end the Markdown link early.
  • site/check/index.html: "Add a badge to your README" in the "Fix it" section, with the image, the Markdown in a <pre> and a "Copy badge Markdown" button. The note beside the image says it shows no result. It sits under the two Copy buttons and their note (and the gap wheels block, when shown), above "Run the same check locally".
  • check.mjs fills the snippet with textContent and copies it with copy(), like the other buttons.
  • Tracker README: a paragraph and the snippet in the Badges section.

How it was tested

  • tests/site/check-logic.test.mjs covers badgeMarkdown(): repo only, a non-default lockfile, and a path with spaces, brackets, quotes, &, # and %, which fromQuery() reads back unchanged.
  • tests/site/check-page.test.mjs checks the SVG (size, no script or external reference, its text) and the page's markup and wiring.
  • The full check.yml command list passes locally.
  • Served site/ locally and checked fastapi/full-stack-fastapi-template in a browser:
    • The badge renders under the page's img-src 'self' policy.
    • The snippet has repo= only on the default uv.lock, and gains &lock=backend/pyproject.toml after picking that file.
    • The button copies the snippet and shows "Badge Markdown copied".
    • No horizontal overflow at 375 px; light and dark themes both read well.

Not done

  • The issue asks for screenshots of the badge in a GitHub README on light and dark themes. The badge URL doesn't exist until this is deployed, so GitHub can't render it yet. That check, and "clicking it opens the checker and runs it", need doing after the next site publish.

🤖 Generated with Claude Code

The checker's URL already works as a permanent link for any public repo, but nothing got a project to put it where its users look. The Fix it section now offers a static badge (site/check/badge.svg, on the page's own origin) with its Markdown and a Copy button. The link carries only the repo, plus the lockfile when it isn't the one the page picks by itself, so a click always checks the default branch on its CI's targets that day. The badge is a fixed image and the page says it shows no result.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@patrickballard
patrickballard merged commit ae6ae4a into main Nov 21, 2026
1 check passed
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.

Repo checker: a "check wheels" badge a project can put in its README

1 participant