fj cannot set issue labels or assignees, though issue edit --help says it can #95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Observation
There is no way to set an issue's labels or assignees from
fj, even though the CLI advertises it.fj issue createexposes no--label/--assigneeflags, and the handler hardcodes both toNone(src/cli/issue.rs:309-314):fj issue editexposes no--label/--assigneeflags either, and the patch it sends carries only title/body/state (src/cli/issue.rs:333-337):Editcommand's doc-comment and--helptext both claim otherwise (src/cli/issue.rs:27): "Edit an issue's title, body, labels, or assignees."fj issue edit --helpprints "Edit an issue's title, body, labels, or assignees" while offering only--titleand--body.The only
--label/--assigneeflags that exist are read-side filters onfj issue list(src/cli/issue.rs:79-84), not write operations. The underlying API layer already models the fields (CreateIssue.labels,CreateIssue.assignees, andEditIssuecould carry them), so the gap is purely at the CLI surface.Practical proof: filing this very batch of issues, applying a label required falling back to
fj apibecausefj issue create/editcannot do it.Why it matters
Labeling and assigning are the core of issue triage, the daily loop for any dev team on the forge.
gh issue create --label/--assigneeandgh issue edit --add-label/--add-assigneeare table stakes, andfjmarkets "full feature parity with gh for the surface Forgejo exposes." A team scripting triage (or an AI agent doing it) discovers, after the help text told them it works, thatfjcan open and close issues but can't route or categorize them. The lying help text is worse than a missing feature: it costs a debugging session before the user concludes the capability isn't there.Possible directions (sketches)
--label/--assignee(repeatable, comma-split) tofj issue create, threading into the already-presentCreateIssue.labels/assignees. Forgejo's create endpoint takes label IDs, so resolve names → IDs via the labels API first (mirror whateverfj labelalready does).--add-label/--remove-label/--add-assignee/--remove-assigneetofj issue edit, backed by the dedicatedPOST/DELETE /issues/{n}/labelsand/assigneesendpoints (gh-style additive semantics).issue editdoc-comment/help atissue.rs:27so it stops promising labels/assignees it can't set.Confidence
High. Verified end to end: no write-side flags in
CreateArgs/EditArgs, both payloads drop the fields (issue.rs:309-337), the only label/assignee flags are list filters (issue.rs:79-84), and the help text claims the capability. Reproduced firsthand (had to usefj apito label issues in this repo).fj issue create#97fj issue edit#98Converted (label
converted). Split into two backlog items along the create vs edit surfaces:backlog,p1): Add--label/--assigneetofj issue create(resolve label names to IDs, thread into the already-modeledCreateIssue.labels/assignees).backlog,p2): Add--add-label/--remove-label/--add-assignee/--remove-assigneetofj issue edit, backed by the dedicated labels/assignees endpoints, and fix the lying doc-comment atsrc/cli/issue.rs:27.Kept open per the product-agent triage convention. Rationale: this is a verified
gh-parity gap in the core triage loop plus a help text that actively claims a capability it lacks, and it was hit firsthand filing this very batch (labels had to be applied throughfj api .../issues/<n>/labels). Create-side is p1 because it unblocks scripted/agent triage filing (the exact pain in this pass); edit-side add/remove is p2 as the follow-on relabel/reassign loop and carries the help-text correction. The help-text-only stopgap from the sketch was not filed separately: both items make the help accurate as part of their acceptance, so a standalone doc fix would be make-work.All derived backlog items merged: rasterstate/fj#97 (PR #101) and rasterstate/fj#98 (PR #104). Closing this opportunity per the issue state machine.