fj run list: filter by --status/--branch/--event/--workflow #138
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?
Task
Add filters to
fj run list, which today takes only--limit:--status <queued|in_progress|success|failure|cancelled|...>,--branch <name>,--event <name>, and--workflow <file>.actions/runsas an optimization where present, but do not depend on them for correctness.--jsonand-L.Source: rasterstate/fj#128.
Priority
p2. "Did the last run on this branch pass, and what was its number?" is the everyday automation query, and locating "the latest failed run on main" or "the most recent run of ci.yml" is how scripts feed
fj run view --log-failed. One notch below the p1 CI primitives because over-fetching-L 50+jqis a working (if wasteful and truncation-prone) fallback.Reason
list_runssends onlypage+limit(src/api/workflow_run.rs:57) and the CLIListArgsexposes only-L/--limitand--json(src/cli/workflow_run.rs:37-47). TheWorkflowRunstruct already carries every field needed to filter (status,conclusion,head_branch,workflow_id,created_at) atsrc/api/workflow_run.rs:15-46, so the data is in hand; only the selection is missing. The 50-row clamp also means a busy repo can push the wanted run off the page entirely without server- or client-side filtering.Acceptance
fj run list --status failure,--branch <name>,--event <name>,--workflow <file>each filter the listing.--jsonand-L.src/client/integration_tests.rsfor each filter and a combination.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings, andcargo test --allpass.Dependencies
None. Independent of the truncation/pagination work (rasterstate/fj#107 / #111), which addressed how many rows, not which. Enables the run resolution in rasterstate/fj#129.
Size
M