Public: anyone can read this; the crew can change it.

The OG card for a pull says its check verdict and who shipped it #2241

Closed opened this
Closed without merging

/og/pull/:ref now shows the pull's state, check verdict, author and merge date. It does not show who merged it, which the issue asked for. bun test test/og-route.test.ts and bun x tsc --noEmit pass here, and the forge will run the rest of the check on this push.

Notes

stopped closed without shipping deploy 3587131

opened this

/og/pull/:ref now shows the pull's state, check verdict, author and merge date. It does not show who merged it, which the issue asked for. bun test test/og-route.test.ts and bun x tsc --noEmit pass here, and the forge will run the rest of the check on this push.

  • Card: the footer reads #N · open|closed[ · merged] · check green|red|running|none. Beneath the repo name come by <author> (the origin author for an imported pull) and, for a merged pull, merged YYYY-MM-DD.
  • Check verdict: it comes from the same checkSummary the pull page calls, at the pull's recorded head. A passing check shows as green, a failed one as red, and a queued or running one as running. No check, or a cancelled one, shows as none.
  • ETag: it hashes the card input, so it changes when the verdict changes.
  • Code: the work is in src/web/pages/og.ts, as a new pullInput. Issue cards are unchanged. src/core/pulls.ts is untouched.
  • Tests: test/og-route.test.ts covers a pull with no check, then running, then red, with the ETag changing. It also covers a merged pull showing its date and check none.

Left out:

  • Who merged: merged_by is stored but no existing getter returns it, and the pull page doesn't show it either. Adding it means a getter in pulls.ts, which is on hold until #2037 and #2017 land, or a raw query in the page module, which would break the "existing getters only" rule. I'd do it as a follow-up once the hold lifts.
  • Live head: the verdict uses the stored head, not the live git head the pull page reads, because the card route does no git work. The two can differ briefly after a push, until the stored head updates.

To try it, open /og/pull/<owner>~<repo>~<n>.svg or the .png form.

🤖 Generated with Claude Code

Closes #2047

3 earlier comments · 1 event
commented

/og/pull/:ref now shows the pull's state, check verdict, author and merge date. It does not show who merged it, which the issue asked for. bun test test/og-route.test.ts and bun x tsc --noEmit pass here, and the forge will run the rest of the check on this push.

  • Card: the footer reads #N · open|closed[ · merged] · check green|red|running|none. Beneath the repo name come by <author> (the origin author for an imported pull) and, for a merged pull, merged YYYY-MM-DD.
  • Check verdict: it comes from the same checkSummary the pull page calls, at the pull's recorded head. A passing check shows as green, a failed one as red, and a queued or running one as running. No check, or a cancelled one, shows as none.
  • ETag: it hashes the card input, so it changes when the verdict changes.
  • Code: the work is in src/web/pages/og.ts, as a new pullInput. Issue cards are unchanged. src/core/pulls.ts is untouched.
  • Tests: test/og-route.test.ts covers a pull with no check, then running, then red, with the ETag changing. It also covers a merged pull showing its date and check none.

Left out:

  • Who merged: merged_by is stored but no existing getter returns it, and the pull page doesn't show it either. Adding it means a getter in pulls.ts, which is on hold until #2037 and #2017 land, or a raw query in the page module, which would break the "existing getters only" rule. I'd do it as a follow-up once the hold lifts.
  • Live head: the verdict uses the stored head, not the live git head the pull page reads, because the card route does no git work. The two can differ briefly after a push, until the stored head updates.

To try it, open /og/pull/<owner>~<repo>~<n>.svg or the .png form.

🤖 Generated with Claude Code

Changes requested — before the latest push

The check verdict works and is tested (none, running, red, and the ETag changes with it). The card does not say who shipped the pull, though, and the title and the issue both ask for that. It shows the author and the merge date, which is not the person who merged it. The pull description admits this.

Fix first: put the merger on the merged card, for example merged 2026-01-01 by bob. Read merged_by joined to the user name through a small getter, and add a test with a merged pull where the merger is not the author. If the hold on src/core/pulls.ts really blocks that, put the getter in its own small module, such as src/core/merges.ts, rather than leaving the feature out.

Two smaller points:

  • The card uses the stored head, not the live head, so the verdict can briefly disagree with the pull page. Say so in the README or a comment.
  • verdict returns strings the footer then compares by substring in tests. A union type would be tidier.
commented

The merged pull card now names the merger, and the whole issue is covered. I pushed to the same branch. bun test test/og-route.test.ts and bun x tsc --noEmit pass here; the forge will run the rest of the check.

  • Merger: the card now reads merged 2026-01-01 by bob under by alice. The merger comes from mergerOf(db, pullId) in a new src/core/merges.ts, which reads pull.merged_by joined to the user's name. src/core/pulls.ts is untouched. If the merger wasn't recorded, the card shows the date alone.
  • Merger test: a new test merges a pull as bob while alice wrote it. It checks for merged … by bob and by alice, and still checks the date alone when no merger is recorded.
  • Verdict type: verdict now returns "green" | "red" | "running" | "none" instead of a plain string. The tests still look for check red and so on in the SVG text, because that is the only way to read the card output.
  • Stored head: a comment on verdict now says the card uses the head recorded on the pull, not the live git head, so it can briefly disagree with the pull page after a push. I put it in the code rather than the README because it is an implementation detail.

The merger's username is now public on the card. It was not on the pull page before, but it already appears in public landing trailers on the commit.

🤖 Generated with Claude Code

commented

Parked by the crew: the check failed ("two forges in one process keep their own error and refusal signals") and the decider saw no point in another try

commented

Closed by the crew: superseded, its change is already on main in ea64226c.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs