~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

knotless checks --ref takes a branch named bare

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:run/private-checks

What changes

knotless checks --ref main, and the MCP checks tool's ref, take a branch named bare, as rerun and workflows already do: main reads as refs/heads/main, or as refs/tags/main when there is that tag and no such branch. A branch deleted since, as a merged pull's, still names its checks, so the name is not looked up only among the refs the repository has now. A name given in full is used as given.

Why

Fixes A private repository's checks are not seen by checks or merge

The issue reads as a private repository's checks going missing, but they were not. Read as chadtmiller.com, knotless checks knotless://chadtmiller.com/hetzner-infra lists every run infra.chadtmiller.com reported, from its repo in the space, the edge-knotless-dns runs at c3699492 among them, and --ref refs/heads/main lists main's. Two other things made them look missing:

  • --ref main and --ref edge-knotless-dns list nothing for any repository, public ones too (knotless checks knotless://chadtmiller.com/knotless --ref main is []). A runner keys a ref's checks by a hash of its full name, and the filter hashed the bare name as given, so its scan found no key. This pull fixes that.
  • --pull and merge's "checks":"none" are as designed. hetzner-infra's workflows run on: push to refs/heads/* and none on: pull, so the seven runs were of a push to the branch, with no pull in them, and a merge waits only for the workflows a pull into its base runs (knotless workflows lists them push,asked). To gate its pulls, hetzner-infra's plan workflows need pull: {base: [refs/heads/main]} too; that change belongs in hetzner-infra, not here.

Resolving in checks::list covers the CLI and MCP at once, which are the only callers that pass a ref; the merge gate, the queue and the runner filter by pull or queue.

How it was checked

A unit test of full_ref (full, bare branch, bare tag, a name both are, a branch gone), and the CLI test of checks now asks --ref main and --ref x and gets what refs/heads/… gets. The rest is left to CI.

Shortcomings

A bare name that is both a branch and a tag reads as the branch, as git would; the tag's checks then take refs/tags/<name>.

Changeset: added (.changeset/checks-bare-ref.md).

🤖 Generated with Claude Code

Approved

This makes checks::list turn a bare --ref name into a full ref before filtering. That covers the CLI and the MCP checks tool. A name starting with refs/ is used as given. A bare name reads as refs/tags/<name> only when there is that tag and no such branch, and as refs/heads/<name> otherwise, so a deleted branch still names its checks. The change comes with a unit test of full_ref, a CLI test, the changeset, and updates to docs/reference/cli.md and the MCP field doc, as AGENTS.md asks. check and web pass and lexicons and shots are skipped; test, docs and e2e were still running or queued when I read them. I found nothing that must change.

Merged as 89bcbb2
Merging this pull closed these issues