Add --add-label/--remove-label/--add-assignee/--remove-assignee to fj issue edit #98
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?
What
Add gh-style additive flags to
fj issue edit(EditArgsinsrc/cli/issue.rs):--add-label,--remove-label,--add-assignee,--remove-assignee(repeatable, comma-splittable). Back them with the dedicated Forgejo endpoints rather than the issue PATCH:POST/DELETE /repos/{owner}/{repo}/issues/{n}/labels(resolving label names to IDs via the labels API) and the issue assignees add/remove path. Leave the existing--title/--bodyPATCH (src/cli/issue.rs:333-337) intact. Correct the doc-comment atsrc/cli/issue.rs:27("Edit an issue's title, body, labels, or assignees") so the--helptext matches what the command actually does.Why
rasterstate/fj#95:
fj issue editadvertises in both its doc-comment and--helpthat it edits "labels, or assignees," but exposes only--title/--bodyand sends a patch that drops those fields. The lying help text is worse than a missing feature: it costs a debugging session before the user concludes the capability is absent. Relabeling and re-assigning existing issues is the core triage loop thatgh issue edit --add-label/--add-assigneecovers, and is required for a team running issue triage throughfj.Acceptance
fj issue edit <n> --add-label bug --remove-label triageadds and removes the named labels via the labels endpoints.fj issue edit <n> --add-assignee alice --remove-assignee bobadds and removes assignees.--title/--bodycontinues to work unchanged when no label/assignee flags are given.fj issue edit --helpand the doc-comment accurately describe the supported operations (no claim the command cannot fulfill).src/client/integration_tests.rsfor the add/remove label and assignee calls.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --allpass.Dependencies
Shares label-name -> ID resolution with the create-side item (the
fj issue create --label/--assigneebacklog issue). Can land independently; if the create item lands first, reuse its resolver rather than duplicating it.Out of scope
fj issue createlabel/assignee flags (separate item).--labelthat sets-and-replaces); this item is additive add/remove only.Size
M