Files
gitea-axi/.claude/tasks/0006-issue-delete-pin-unpin.md
alexion d03a079854 docs: adopt Conventional Commits and land planning docs
- 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
2026-07-11 07:14:39 -04:00

1.1 KiB

spec, blocked-by
spec blocked-by
gitea-axi 0004-issue-create-and-comment

What to build

The remaining simple issue mutations: issue delete, issue pin, issue unpin. issue delete <n> hard-deletes via the DELETE endpoint (requires admin or owner permissions) and is deliberately not idempotent: a nonexistent issue errors with ISSUE_NOT_FOUND rather than reporting success (see ADR 0010). issue pin <n> and issue unpin <n> call the pin endpoints and are idempotent, returning early with Already pinned/Already unpinned messages. issue lock/unlock, issue transfer, and issue subissue remain excluded per the spec.

Acceptance criteria

  • issue delete <n> outputs issue: { number, status: "deleted" } on success
  • Deleting a nonexistent issue yields ISSUE_NOT_FOUND (exit 1), not idempotent success
  • issue pin <n> outputs issue: { number, state, pinned }; pinning an already-pinned issue returns early with message: "Already pinned" and exit 0
  • issue unpin <n> mirrors pin with message: "Already unpinned" on the no-op
  • Fixture-server tests cover delete success, delete-missing refusal, and both pin/unpin no-ops