~ 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

A branch's gates are its required reviewers, asked of every pull into it

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:forge/required-reviewers

What changes

Gates are required reviewers. Every pull into a protected branch now asks each gate its rule names to review it, after those its author and maintainers ask. A gate shows among a pull's reviewers before it has reviewed, marked "Required reviewer for main" in the reviewers menu, and the merge box's row says "review required". unask-review refuses to stop asking one and says to change the rule instead. Each pull's view gives requiredReviewers, the reviewers its base's rule requires.

A required reviewer's approval is no longer called uncounted. merge --check, the queue's ejections and the merge box listed a gate's approval as "does not count: only the owner's and collaborators' approvals count". Its approval does what it is for, letting the pull go, so it is left out of that list.

Branch settings read in two groups. A rule's controls are grouped under Merging (the merge queue, linear history) and Reviews (approvals, code owners, stale approvals, required reviewers). The gate list is renamed Required reviewers, and its hint links the guide to setting up a review agent. Three page-level hints that repeated the controls' own are gone.

The reviewers menu sizes to what it says. On desktop, it is as wide as its rows, up to 28rem. Before, a handle and its note wrapped a word at a time.

Why

A branch could require approvals and also wait on gates, and the two read as separate ideas. A gate was invisible on a pull until it reviewed, so a pull seemed to need nothing while it waited on one. Asking gates as reviewers is how GitHub's required reviewers read: you see who the pull waits on from the start.

How it was checked

maintainers_dismiss_reviews now checks that show lists the gate as requested and that unask-review of a gate is refused. a_gate_is_waited_for_and_its_changes_block checks that a gate's approval is not listed as uncounted. The rest is left to CI.

The pictures show the reviewers menu with a required reviewer who hasn't reviewed yet, desktop light and phone dark, from just look on pull-open. The branch settings page moves on purpose, and the e2e flow for gates finds the field by its new label.

Shots-moved: settings-branches

Shortcomings

knotless-agent review reviews the pulls whose reviewers name its account, or every pull with --all. Before this, an agent run without --all and named as a gate never reviewed a pull until someone asked it by hand, so the pull sat waiting. Now it is asked automatically. knotless.dev runs its agent with --all, so nothing changes there.

🤖 Generated with Claude Code

menu-desktop-light.png

menu-phone-dark.png

Approved

This makes every gate of a protected branch's rule a required reviewer. Gates are added to each pull's reviewers after the asked ones. unask-review refuses to remove one, and requiredReviewers is exposed on the item view. A gate's approval is no longer listed as uncounted, and branch settings are regrouped. The logic is small and the new unit and forge tests cover it. I found nothing that must change before merging.

Two things the pull's checks will catch, so I'm not withholding approval for them:

  • harness/e2e/flows.spec.mjs:550-551 still looks up the gate field by the label Wait for a review from. This pull renames that label to "Required reviewers" and adds a hint inside the label, so the e2e check will likely fail until the flow is updated. The new "Keep history linear" checkbox also has no flow, though AGENTS.md asks for one for a new control that writes.
  • The body says the branch settings page moves on purpose but has no Shots-moved: line, which the shots check requires.

Smaller points:

  • docs/reference/cli.md (the ask-review row) is missing a full stop: "so unasking one fails Prints those asked now".
  • Gates are added to reviewers for every pull regardless of state, so a rule change also changes the reviewers shown on already merged or closed pulls. That is probably fine, but intended?
docs/reference/cli.mdline 151
| `close <url> <at-uri>` / `reopen <url> <at-uri>` | change an item's state |
| `label <url> <at-uri> <label>...` / `unlabel <url> <at-uri> <label>...` | as owner, collaborator or a triager of their scope, put labels on an item or take them off; prints those it carries now |
| `assign <url> <at-uri> <handle>...` / `unassign <url> <at-uri> <handle>...` | as owner or collaborator, assign a pull or issue to accounts, or take them off it; prints those it is assigned to now ([collaboration.md](../design/collaboration.md#assignees)) |
| `ask-review <url> <at-uri> <handle>...` / `unask-review <url> <at-uri> <handle>...` | ask accounts to review a pull, or stop asking them: as its author, in the pull, as `edit --reviewer` does, or as owner or collaborator, in your own record. Each stops asking only those it asked, and is told who asked when it did not. A required reviewer, a gate of the rule protecting the pull's base, is asked of every pull and stays asked until the rule stops naming it, so unasking one fails Prints those asked now |
review.knotless.dev

Missing a full stop before "Prints those asked now".

Approved

This is the same change as before, plus one new commit that only changes a test to read a pull's required reviewers from the pages' list. I did not re-read the full diff for this round. I found nothing that must change.

My earlier review asked for nothing blocking. Its open notes are the e2e flow label lookup, the Shots-moved: line and the missing full stop at docs/reference/cli.md:151. I did not check whether they were addressed.

The e2e, test and shots checks were still running or queued when I looked, so the e2e label and Shots-moved: points will show up there if they were not fixed.

Approved

This is round 3. The pull still makes each gate of a protected branch's rule a required reviewer. I did not re-read the full diff this round, and I found nothing that must change.

My earlier reviews asked for nothing blocking. Their open notes are the e2e gate-field label lookup, the Shots-moved: line and the missing full stop at docs/reference/cli.md:151. I did not check whether they were fixed.

All checks for this head (e2e, shots, test, docs and the others) were still queued when I looked. If the e2e label or Shots-moved: points were not fixed, those checks will show it.

Merged as 6bdb93f