forgejo verbs: add/remove labels on an issue (with canonical-path resolution) #159

Open
opened 2026-05-30 17:39:36 +00:00 by coilysiren · 0 comments
Owner

Gap

coily ops forgejo issue covers create/list/view/edit/comment/close/reopen/delete, and coily ops forgejo label covers label-definition CRUD (create labels). But there is no verb to add/remove a label on an issue. The 2026-05-30 priority-labeling work (P0-P3 across ~730 issues) had to bypass coily and hit the API directly because of this.

Wanted verbs

  • coily ops forgejo issue label add --repo <owner/name> --index <N> --label <name> (accept repeat --label)
  • coily ops forgejo issue label remove --repo <owner/name> --index <N> --label <name>
  • optionally ... label set ... to replace the full set

Accept label by name (resolve to id internally) so callers don't juggle numeric ids.

Must-have: canonical-path resolution

These are mutating verbs, so they hit the org-split redirect bug head-on (see #549): a write to a moved repo's old coilysiren/* path 301-redirects, the body is dropped, and it silently no-ops with a 200. The new verbs (and ideally all mutating forgejo verbs) must resolve the repo's canonical full_name via GET /repos/{owner}/{name} before issuing the write, or refuse to follow a 301 on a non-GET and surface a loud "repo moved to X" error.

Why

Per-issue labeling is now a routine backlog operation (priority tiers, icebox). Routing it through coily gives the audit row and the canonical-path safety that raw curl does not. See the kai-issue-prioritization skill.

## Gap `coily ops forgejo issue` covers create/list/view/edit/comment/close/reopen/delete, and `coily ops forgejo label` covers label-definition CRUD (create labels). But there is **no verb to add/remove a label on an issue**. The 2026-05-30 priority-labeling work (P0-P3 across ~730 issues) had to bypass coily and hit the API directly because of this. ## Wanted verbs - `coily ops forgejo issue label add --repo <owner/name> --index <N> --label <name>` (accept repeat `--label`) - `coily ops forgejo issue label remove --repo <owner/name> --index <N> --label <name>` - optionally `... label set ...` to replace the full set Accept label by **name** (resolve to id internally) so callers don't juggle numeric ids. ## Must-have: canonical-path resolution These are mutating verbs, so they hit the org-split redirect bug head-on (see #549): a write to a moved repo's old `coilysiren/*` path 301-redirects, the body is dropped, and it silently no-ops with a 200. The new verbs (and ideally all mutating forgejo verbs) must resolve the repo's canonical `full_name` via `GET /repos/{owner}/{name}` before issuing the write, or refuse to follow a 301 on a non-GET and surface a loud "repo moved to X" error. ## Why Per-issue labeling is now a routine backlog operation (priority tiers, `icebox`). Routing it through coily gives the audit row and the canonical-path safety that raw curl does not. See the `kai-issue-prioritization` skill.
coilysiren added
P3
and removed
P2
labels 2026-05-31 06:59:39 +00:00
Sign in to join this conversation.
No labels
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
coilyco-bridge/coily#159
No description provided.