ops forgejo label: add CRUD verbs #71

Closed
opened 2026-05-25 00:23:01 +00:00 by coilysiren · 0 comments
Owner

Problem

The gh label verb set (create, list, edit, delete) has direct forgejo API equivalents but no coily surface. Agents that want to enforce a per-repo label taxonomy still have to drop to curl + SSM.

Scope

Add the following under coily ops forgejo label:

  • create --repo <owner/name> --name N --color HEX [--description-file PATH] -> POST /repos/{owner}/{repo}/labels
  • list --repo <owner/name> -> GET /repos/{owner}/{repo}/labels
  • edit --repo <owner/name> --id ID [--name N] [--color HEX] [--description-file PATH] -> PATCH /repos/{owner}/{repo}/labels/{id}
  • delete --repo <owner/name> --id ID -> DELETE /repos/{owner}/{repo}/labels/{id}

edit and delete take --id (forgejo's native key for labels) rather than --name. coily ops forgejo label list prints the id, name, and color so the operator can resolve a name -> id without a second tool. A name-based shorthand can come later if it earns its weight.

Color is validated as a 6-hex-digit string (with or without leading #). Description is taken from a file to keep multi-word values past the lockdown metacharacter gate.

Why

Second noun of the 5-noun sweep, after issue (coilysiren/coily#69, coilysiren/coily#70). Lowest-frequency surface, smallest verb count - good shake-out for the per-noun cadence.

**Problem** The `gh label` verb set (`create`, `list`, `edit`, `delete`) has direct forgejo API equivalents but no coily surface. Agents that want to enforce a per-repo label taxonomy still have to drop to curl + SSM. **Scope** Add the following under `coily ops forgejo label`: - `create --repo <owner/name> --name N --color HEX [--description-file PATH]` -> `POST /repos/{owner}/{repo}/labels` - `list --repo <owner/name>` -> `GET /repos/{owner}/{repo}/labels` - `edit --repo <owner/name> --id ID [--name N] [--color HEX] [--description-file PATH]` -> `PATCH /repos/{owner}/{repo}/labels/{id}` - `delete --repo <owner/name> --id ID` -> `DELETE /repos/{owner}/{repo}/labels/{id}` `edit` and `delete` take `--id` (forgejo's native key for labels) rather than `--name`. `coily ops forgejo label list` prints the id, name, and color so the operator can resolve a name -> id without a second tool. A name-based shorthand can come later if it earns its weight. Color is validated as a 6-hex-digit string (with or without leading `#`). Description is taken from a file to keep multi-word values past the lockdown metacharacter gate. **Why** Second noun of the 5-noun sweep, after `issue` (coilysiren/coily#69, coilysiren/coily#70). Lowest-frequency surface, smallest verb count - good shake-out for the per-noun cadence.
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#71
No description provided.