fj pr cannot label or assign a pull request (create or edit), though it can request reviewers #110
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
fjcan request reviewers on a pull request but cannot label or assign one. There is no--label/--assigneeonfj pr create, no add/remove onfj pr edit, and nofj prsubcommand for either, even though the PR data model already reads both fields back and a dormant API helper for the write already exists.fj prhas a rich verb set (checkout,merge,close,reopen,ready,comment,review,request-review,unrequest-review), so reviewers are covered. Labels and assignees are simply absent:The arg structs confirm it:
CreateArgs(src/cli/pr.rs:107-132) is title/base/head/body/attach/draft/web;EditArgs(src/cli/pr.rs:134-152) is title/body/body_editor/attach. The API payloads match:CreatePull(src/api/pull_core.rs:147-153) carriestitle/head/base/body/draftonly, andEditPull(src/api/pull_core.rs:168-179) carriestitle/body/state/baseonly. Neither models labels or assignees on the write path.This is a write-only gap, not a data-model gap. The
Pullstruct already deserializes both fields on read (src/api/pull_core.rs:27pub labels: Vec<Label>,:43pub requested_reviewers: Vec<User>), sofj pr viewcan show a PR's labels but nothing can set them. And the label write endpoint is already implemented, just dormant (src/api/label.rs:98-122):In Forgejo a PR is an issue, so
POST /issues/{number}/labelslabels a PR too. The plumbing exists; no CLI verb reaches it.Note this is distinct from the issue-side gap tracked in
rasterstate/fj#95/rasterstate/fj#98(those arefj issue create/edit). This is the parallel hole on the pull-request surface, where reviewers are already solved but labels and assignees are not.Why it matters
Routing a PR is half of code-review triage: label it
needs-review/area/api, assign the owner, then it shows up in everyone's filtered queues.gh pr create --label --assignee --reviewerandgh pr edit --add-label --add-assigneeare standard, and a team scripting "open PR, label it, assign it" againstfjcan do the open and the reviewers but must drop tofj apifor the label and assignee, the same raw-API fallback the tool exists to remove. It is more jarring here than for a totally-missing feature becausefj pr request-reviewexists right next to it, so the user reasonably expects labeling to be a sibling flag and only discovers otherwise mid-script. It also pairs badly with the read side:fj pr viewshows labels the CLI gives you no way to have set.Possible directions (sketches)
--label/--assignee(repeatable, comma-split) tofj pr create, threading intoCreatePull(Forgejo's create-PR endpoint acceptslabelsas IDs andassigneesas logins; resolve label names to IDs via the labels API first).--add-label/--remove-label/--add-assignee/--remove-assigneetofj pr edit, backed by the already-presentadd_to_issue/remove_from_issue(src/api/label.rs:98-122, drop the#[allow(dead_code)]) and the parallel assignees endpoint. Whatever solution lands forrasterstate/fj#98on the issue side should be shared verbatim, since PRs and issues hit the same endpoints.fj label add/remove <number>that works for both issues and PRs would close#98and this in one verb.Confidence
High. Flag absence verified from
--helpand the arg/payload structs (src/cli/pr.rs:107-152,src/api/pull_core.rs:147-179); read-side modeling verified (src/api/pull_core.rs:27,43); the dormant write helper verified (src/api/label.rs:98-122). The shared-endpoint fact (PR == issue in Forgejo) is standard Gitea/Forgejo behavior. The only open question is whether to solve it jointly with the issue-side#98, which is a design call.Converted to backlog item
rasterstate/fj#114(p2, size M).Tracked there with task / priority / reason / acceptance / dependencies. Keeping this open with the
convertedlabel as the originating opportunity.Derived backlog item rasterstate/fj#114 is merged. Closing this opportunity per the issue state machine.