feat: add issue blocks and blocked-by (task 0007) #10
Reference in New Issue
Block a user
Delete Branch "task-0007-issue-blocks-blocked-by"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task:
.claude/tasks/0007-issue-blocks-blocked-by.mdSummary
Adds the two Gitea-specific dependency subcommand groups over Gitea's blocks/dependencies endpoints:
issue blocks <list|add|remove>— the issues this issue blocks (downstream dependents;/issues/{index}/blocks).issue blocked-by <list|add|remove>— the issues that block this issue (upstream blockers;/issues/{index}/dependencies).Both are one config-parameterised implementation differing only in the endpoint calls and the spec-fixed output names (
blocked_issues/blocking_issuesforlist,blocks/blocked_byforadd).add/removeare fetch-first against the fully paginated current set: an existing relationship onaddreturnsalready: truewith no POST, and a nonexistent issue surfaces asISSUE_NOT_FOUNDbefore any mutation. Self-reference and cycle rejections come back from Gitea as 422 →VALIDATION_ERRORwith the server's message.Deviations (spec was silent on these):
removeoutput. A real deletion reportsremoved: true; a no-op removal (relationship already absent) reportsalready: trueinstead — mirroringadd's no-op and honouring the action/entity-block convention rather than claiming a deletion that did not happen.listrow fields arenumber,title,state— the identifying essentials.Review
Risk
Overall: Low
issue.ts; existing paths untouched.issue-blocks.test.tsparameterizes both groups across list/add/remove, idempotency, silent-remove, validation, cycle rejection, and help.Unaddressed findings
Standards (both judgement calls, intentionally left):
GROUPconstants and the test'sGROUPSarray. Inherent to a spec that fixes different output names per direction; the reviewer agreed the parameterised-config approach is the right call and the duplication is by necessity, not accident.DependencyGroupuses barestringfor its config fields. Not worth a domain type for a closed set of only two instances.Spec: no unaddressed findings — the missing
ISSUE_NOT_FOUNDtest and theremoveno-op output convention were both fixed in this change.