Add --label and --assignee to fj issue create #97
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 repeatable, comma-splittable
--labeland--assigneeflags tofj issue create(CreateArgsinsrc/cli/issue.rs). Thread them into the already-presentCreateIssue.labels/CreateIssue.assigneesfields, currently hardcoded toNoneatsrc/cli/issue.rs:309-314. Forgejo's create-issue endpoint takes label IDs, not names, so resolve label names to IDs via the labels API (/repos/{owner}/{repo}/labels) before building the payload, reusing whatever resolutionfj labelalready does; error clearly on an unknown label name. Assignees are passed through as usernames. Update theCreatecommand doc-comment and--helpso they accurately list the new flags.Why
rasterstate/fj#95:
fj issue createexposes no--label/--assigneeflags and hardcodes both toNone, even thoughfjmarkets "full feature parity with gh" andgh issue create --label/--assigneeis table stakes. Filing the current batch of opportunity issues (rasterstate/fj#93, #94, #95) required falling back tofj api .../issues/<n>/labelsbecause the CLI could not label them: the gap blocks scripted and agent-driven triage, the exact daily loop a team adopting the forge CLI needs. The API layer already models the fields, so the gap is purely at the CLI surface.Acceptance
fj issue create --label bug --label enhancementandfj issue create --label bug,enhancementboth attach the named labels (names resolved to IDs).fj issue create --assignee alice --assignee bobassigns both users.fj issue create --helplists--labeland--assigneeand the doc-comment matches the behavior.src/client/integration_tests.rsfor label-name resolution plus a create payload carrying the resolved IDs and assignees.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --allpass.Dependencies
none
Out of scope
fj issue edit).Size
M