Closes #340.
- Edit everywhere:
- the
update_pullRPC; - the API (
PATCH /repos/{owner}/{name}/pulls/{number}); - MCP
pull_request update; - the CLI:
g1t pr edit [N] --title | --body | --body-file | --item N(--item 0unlinks); - an Edit dialog beside the title on the PR page.
- the
- Who: the author, whoever asked g1t for it, or someone with Write. Changing the PR's own work item needs read access to both the old and the new one, and the new one must be open.
- References are read again: after an edit,
Closes/Part ofare re-read with the same logic as at open. Only items visible to both the editor and the author are linked (admits). Dropped items are unlinked, and the PR's own item stays first. - Merged and closed PRs: only their text can change. A merged PR's landings and item never change; the SQL guards this too, so a merge landing mid-edit can't be overwritten. A closed PR's item changes only after it is reopened.
- Events:
pull.edited, which webhooks receive and which runspull_request: editedworkflows with GitHub-stylechanges. A title or item change is noted in the conversation. - No silent ignores:
update_pull_requestnow answers 422 for fields it doesn't take, through aSTRICTlist that other operations can opt into one at a time. It isn't on for every operation, because MCP clients routinely send other actions' fields. - Docs:
- a new "Edit a pull request" section in the pull requests guide;
pull.editedin the webhooks table;- MCP, API reference and OpenAPI updated;
- the CLI reference regenerated.
Validation:
- cargo tests pass for contracts, actions, work, security, actions-service and api; workspace and wasm32 checks pass.
- CLI tests pass, except one that fails only with
G1T_TOUCH=0in the environment. - The contracts package passes, and so do web typecheck, tests (1179), build, load-check and deploy-check.
- conformance (78), test:deploy (123), astro (605 pages) and prettier pass.
- The service's D1 paths have no automated tests (the work service can't run D1 in tests); its pure parts do.