broker write tier can't set issue labels (edit --labels / issue-label sub-collection) #615

Closed
opened 2026-07-06 01:54:50 +00:00 by coilysiren · 1 comment
Owner

Split out from #613. Fixing the comment break there revealed that edit --labels is a different class of problem than the comment create verb-path typo.

What's actually wrong

ward ops forgejo issue edit ... --labels X fails with flag provided but not defined: -labels because forgejo's edit endpoint (EditIssueOption) has no labels field. Labels live in a separate sub-collection:

ops forgejo issue-label add    POST   /repos/{owner}/{repo}/issues/{index}/labels
ops forgejo issue-label set    PUT    .../labels
ops forgejo issue-label remove DELETE .../labels/{identifier}

So --labels on issue edit never existed and can't - it's the wrong verb.

The real gap

From a director surface (broker), labels can't be set at all: the broker write tier serves only file/edit/comment issue (broker.Op set in cmd/ward/broker_exec.go), and mapForgejoWriteOp in broker_client.go only maps the issue resource. The issue-label verbs route nowhere. Setting a label from that seat needs:

  • a new broker.Op (e.g. OpLabelIssue) + executor method shelling issue-label add/set,
  • an authorizer allowlist entry,
  • a brokerForgejoAction mapping for the issue-label resource.

This is an additive feature, not a bugfix, so it's its own issue rather than riding #613.

Split out from #613. Fixing the comment break there revealed that `edit --labels` is a *different* class of problem than the `comment create` verb-path typo. ## What's actually wrong `ward ops forgejo issue edit ... --labels X` fails with `flag provided but not defined: -labels` because forgejo's edit endpoint (`EditIssueOption`) has **no labels field**. Labels live in a separate sub-collection: ``` ops forgejo issue-label add POST /repos/{owner}/{repo}/issues/{index}/labels ops forgejo issue-label set PUT .../labels ops forgejo issue-label remove DELETE .../labels/{identifier} ``` So `--labels` on `issue edit` never existed and can't - it's the wrong verb. ## The real gap From a director surface (broker), labels can't be set at all: the broker write tier serves only file/edit/comment issue (`broker.Op` set in `cmd/ward/broker_exec.go`), and `mapForgejoWriteOp` in `broker_client.go` only maps the `issue` resource. The `issue-label` verbs route nowhere. Setting a label from that seat needs: - a new `broker.Op` (e.g. `OpLabelIssue`) + executor method shelling `issue-label add/set`, - an authorizer allowlist entry, - a `brokerForgejoAction` mapping for the `issue-label` resource. This is an additive feature, not a bugfix, so it's its own issue rather than riding #613.
Author
Owner

Closing: duplicate of #618. Both request the broker OpLabelIssue path for issue-label add/set/remove; #618 is the actionable successor and names the cli-guard#193 dependency. Tracking there. Re-triage 2026-07-06.

Closing: duplicate of #618. Both request the broker OpLabelIssue path for issue-label add/set/remove; #618 is the actionable successor and names the cli-guard#193 dependency. Tracking there. Re-triage 2026-07-06.
Sign in to join this conversation.
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-flight-deck/ward#615
No description provided.