fj pr list cannot filter by label/assignee/author, though fj issue list filters by label and assignee #108
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
fj pr listcan only filter by state. There is no way to narrow pull requests by label, assignee, or author, even thoughfj issue listalready offers label and assignee filters against the same forge.fj pr list --helpexposes only--state,--limit,--page,--json,--web:The CLI struct carries nothing else (
src/cli/pr.rs:69-88,ListArgs: onlystate,limit,page,json,web), and the API options it feeds carry nothing else either (src/api/pull_core.rs:100-104):The asymmetry is the sharp part: the issue path already does this.
fj issue listaccepts--labeland--assignee(src/cli/issue.rs:67ListArgs), and the issueListOptionsthreads them straight into the query string (src/api/issue.rs:66-71,99-102):Forgejo serves PRs through the issues model and accepts the same
labels/assignee/posterquery parameters onGET /repos/{owner}/{repo}/pulls(and/issues?type=pulls), so the gap is purely at the CLI/options layer, not the API's. Neitherpr listnorissue listexposes an author/--authorfilter at all.Why it matters
"Show me the PRs I need to act on" is the spine of the daily review loop, and it is almost always a filtered query: PRs with the
needs-reviewlabel, PRs assigned to me, PRs opened by a given teammate.gh pr list --label <l> --assignee <a> --author <u>is table stakes, andfjmarkets parity with gh for the surface Forgejo exposes. Today a team scripting triage onfj pr listcan only slice by open/closed/all and must fall back tofj apiwith hand-built query strings, the exact escape hatch the tool is supposed to remove. The fact thatissue listalready has the filters makes the omission read as an oversight rather than a Forgejo limitation, and it breaks the muscle memory of anyone who learned the issue command first.Possible directions (sketches)
--labeland--assigneetofj pr list, mirroringsrc/cli/issue.rs:67flag-for-flag, and thread them intopull_core::ListOptionsand its query builder the same waysrc/api/issue.rs:99-102does.--authorto bothpr listandissue list(Forgejo'sposter/created_byquery param) to close the gh--authorgap in one move.clapArgsstruct so issue and PR list stay in lockstep and cannot drift again.Confidence
High. The flags' absence is verified from both
fj pr list --helpand the source (src/cli/pr.rs:69-88,src/api/pull_core.rs:100-104), and the working contrast on the issue side is verified (src/cli/issue.rs:67,src/api/issue.rs:66-71,99-102). The only open question is the exact Forgejo query-param spelling for PR author filtering, which is an implementation detail, not a question of whether the gap exists.Converted to backlog item
rasterstate/fj#113(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#113 merged (PR #130). Closing this opportunity per the issue state machine.