- CONVENTIONAL-COMMITS.md: vendored spec (v1.0.0); CLAUDE.md requires agent-written commits to follow it - tasks 0002-0020: remaining task breakdown of the gitea-axi spec (0019 reframed around the three-tier test taxonomy: unit, integration, end-to-end) - spec, CONTEXT.md, and ADRs 0006/0007/0011: pending design refinements from the planning sessions
1.9 KiB
spec, blocked-by
| spec | blocked-by |
|---|---|
| gitea-axi | 0005-issue-edit-close-reopen |
What to build
The PR-side state mutations: pr edit, pr close, pr reopen, mirroring the issue-side slice with two PR-specific differences.
pr edit <n> supports --title, --body/--body-file, --add-label/--remove-label (same additive-endpoint and lookup rules as issues), --add-assignee/--remove-assignee (fetch-then-patch), --add-reviewer/--remove-reviewer, --milestone (name-resolved), and --base.
Reviewer mutations cannot use fetch-then-patch — EditPullRequestOption has no reviewers field — so they go through Gitea's dedicated requested-reviewers POST/DELETE endpoints (see ADR 0007 amendment).
pr close <n> supports --comment with the same two-call partial-failure policy as issue close, and returns pull_request: { number, state, already: true } when already closed or merged.
pr reopen <n> returns pull_request: { number, state: "open", already: true } when already open.
Success outputs follow the action-block pattern: edited:/closed:/reopened: with { number, status: "ok" }.
Acceptance criteria
pr editapplies title, body, milestone, and base changes and outputsedited: { number, status: "ok" }- Label and assignee mutations follow the same rules as
issue edit(additive endpoints, fetch-then-patch, unapplied-label silent success) --add-reviewer/--remove-reviewercall the requested-reviewers endpoints with{ reviewers: [login] }pr close --commentposts the comment after the PATCH and surfaces a comment failure; closing an already-closed-or-merged PR returns the entity block withalready: truepr reopenon an open PR returns the entity block withalready: true; otherwise outputsreopened: { number, status: "ok" }- Fixture-server tests cover reviewer add/remove, the merged-PR close no-op, and the reopen paths