fj pr list: filter by --label/--assignee/--author (and add --author to issue list) #113

Closed
opened 2026-06-11 00:08:49 +00:00 by stephen · 0 comments
Owner

Task

Add filtering flags to fj pr list, mirroring the issue side flag-for-flag:

  • --label and --assignee on fj pr list, threaded into pull_core::ListOptions and its query builder the same way src/api/issue.rs threads labels/assignee.
  • --author on both pr list and issue list (Forgejo's poster / created_by query param), closing the gh --author gap in one move.
  • Factor the shared label/assignee/author filter flags into a small reusable clap Args struct so issue and PR list stay in lockstep and cannot drift again.

Source: rasterstate/fj#108.

Priority

p2. "Show me the PRs I need to act on" (label needs-review, assigned to me, opened by teammate X) is the spine of the daily review loop and is almost always a filtered query. Strong gh-parity value; one notch below the silent-truncation/JSON-gap p1s because there is a working fj api fallback today.

Reason

fj pr list filters by state only (src/cli/pr.rs ListArgs; src/api/pull_core.rs ListOptions carry just state/limit/page), while fj issue list already accepts --label/--assignee against the same forge. Forgejo serves PRs through the issues model and accepts the same labels/assignee/poster params, so the gap is purely at the CLI/options layer. The asymmetry breaks the muscle memory of anyone who learned the issue command first.

Acceptance

  • fj pr list --label needs-review filters PRs by label.
  • fj pr list --assignee alice filters PRs by assignee.
  • fj pr list --author bob and fj issue list --author bob filter by poster/creator.
  • Label/assignee/author flags live in one shared clap Args struct used by both pr list and issue list.
  • Wiremock coverage in src/client/integration_tests.rs for the new query params on the pulls endpoint.
  • cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test --all pass.

Dependencies

None. Independent of the write-side label work; reuses the existing issue-list query-building pattern.

Size

M

## Task Add filtering flags to `fj pr list`, mirroring the issue side flag-for-flag: - `--label` and `--assignee` on `fj pr list`, threaded into `pull_core::ListOptions` and its query builder the same way `src/api/issue.rs` threads `labels`/`assignee`. - `--author` on both `pr list` and `issue list` (Forgejo's `poster` / `created_by` query param), closing the gh `--author` gap in one move. - Factor the shared label/assignee/author filter flags into a small reusable `clap` `Args` struct so issue and PR list stay in lockstep and cannot drift again. Source: `rasterstate/fj#108`. ## Priority p2. "Show me the PRs I need to act on" (label `needs-review`, assigned to me, opened by teammate X) is the spine of the daily review loop and is almost always a filtered query. Strong gh-parity value; one notch below the silent-truncation/JSON-gap p1s because there is a working `fj api` fallback today. ## Reason `fj pr list` filters by state only (`src/cli/pr.rs` `ListArgs`; `src/api/pull_core.rs` `ListOptions` carry just state/limit/page), while `fj issue list` already accepts `--label`/`--assignee` against the same forge. Forgejo serves PRs through the issues model and accepts the same `labels`/`assignee`/`poster` params, so the gap is purely at the CLI/options layer. The asymmetry breaks the muscle memory of anyone who learned the issue command first. ## Acceptance - [ ] `fj pr list --label needs-review` filters PRs by label. - [ ] `fj pr list --assignee alice` filters PRs by assignee. - [ ] `fj pr list --author bob` and `fj issue list --author bob` filter by poster/creator. - [ ] Label/assignee/author flags live in one shared `clap` `Args` struct used by both `pr list` and `issue list`. - [ ] Wiremock coverage in `src/client/integration_tests.rs` for the new query params on the pulls endpoint. - [ ] `cargo fmt --check`, `cargo clippy --all-targets --all-features -- -D warnings`, and `cargo test --all` pass. ## Dependencies None. Independent of the write-side label work; reuses the existing issue-list query-building pattern. ## Size M
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/fj#113
No description provided.