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

A pull takes a new title or body after it was opened, and an issue with it #912

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A pull's body is editable after opening, and an issue's with it.

shipped production is serving it deploy aa26afa

opened this

A pull's body is editable after opening, and an issue's with it.

Opened early; tests follow. The description comes as a comment when the pull is ready.

  • PATCH /api/v1/repos/:o/:n/pulls/:n and …/issues/:n take title and body beside state; the author or a person who writes may; an agent edits only what it wrote; a mirror is refused.
  • The change page and the issue page open the words for editing under the opening post.
  • MCP edit { repo, number, title?, body? }.
  • Events pull.edited and issue.edited name what changed, never the words.
  • Rides along: dots punctuate only when no name follows them (<dir>..bak, from #905's review).

🤖 Generated with Claude Code

commented

A pull takes a new title or body after it was opened, and an issue with it

A dozen pulls tonight carried bodies that still said work in progress, because nothing let anyone change them; the crew's pulls have the same problem. Nothing edited an issue's words either, so one action serves both kinds.

Who may

  • The author, whoever that is: a person, or the crew agent that opened the pull.
  • A person who writes the repository, over anyone's words.
  • An agent that did not write it may not: the crew lands, labels and closes, but a person's words are the person's.
  • A reader, a stranger, a read-only token, and anyone who cannot see the repository are refused; the last as if the issue were not there. A mirror's words belong to its origin (mirrored, 409; not covered by a test, since a mirror fixture is the fake-origin suite).

One rule, mayEditIssue (src/actions/issues.ts), asked by the action and by both pages before a form is offered.

Reach

  • PATCH /api/v1/repos/:o/:n/pulls/:n and …/issues/:n take title and body beside state: words first, then the state, each its own authorization; either alone is a whole request; nothing in it is nothing_to_change (422), the wrong shape is invalid_text.
  • The change page and the issue page: _Edit_ under the opening post (<details>, one form, one Save), posting to …/pulls/:n/edit and …/issues/:n/edit. The timeline shows "edited this".
  • MCP edit { repo, number, title?, body? }, resolving the issue through the same door the plan tools use (issueArg), so what it comes to refuse — a sealed one, once #865 lands — is refused here too.

The event

pull.edited / issue.edited, payload { number, changed: ["title" | "body"] }: what changed, never the words. Reader audience like a comment; a sealed pull's words stay where its seal keeps them. The same words again change nothing and say nothing.

What a pull closes, whom it answers and the map are read from the body on every read, so they follow the edit with no column to drift.

Rides along

Dots punctuate only when no name follows them (<dir>..bak is a sibling's), from #905's review.

Tests (test/edit-words.test.ts, 7, in the gate)

Refusing first: stranger, reader, read-only token, by API, MCP, form and action; cannot-see answers like a missing issue; an agent on a person's issue. Then: the agent's own pull, what it closes following the body, the event's shape; a writer on title and body and a close in one PATCH; the empty and wrong-shaped requests; the MCP tool; the pages and the form. With any reader allowed to edit, two tests fail (tried once).

Ran

Under a heavy slot on the head: tsc clean; edit-words, mcp, issues, crew-parks, map-closing, outsiders-switch, push-through, event-audience, feed, crew and the five cross files in one call, 370 pass, 0 fail.

Look

Phone, 390px: the folded _Edit_ under the opening post, the open form with title and body, and the timeline after a save (trevato edited this just now). Pictures in scratchpad/landed/edit-*.png.

🤖 Generated with Claude Code

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs