fj run list cannot filter by status/branch/event/workflow, forcing scripts to grep JSON #128
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
fj run listtakes only--limit. It cannot filter by status, branch,event, or workflow, so any "find the run I care about" query in a script
has to fetch a page and post-process the JSON by hand.
gh run listsupports--status,--branch,--workflow,--event,--user, which is how CIlocates "the latest failed run on
main" or "the most recent run ofci.yml".Evidence
list_runssends onlypage+limitand nothing else(
src/api/workflow_run.rs:57):The CLI
ListArgsexposes only-L/--limitand--json(
src/cli/workflow_run.rs:37-47). TheWorkflowRunstruct already carriesevery field needed to filter (
status,conclusion,head_branch,workflow_id,created_at) atsrc/api/workflow_run.rs:15-46, so the data isin hand; only the selection is missing.
Why it matters for CI/automation buyers
The everyday automation query is "did the last run on this branch pass, and what
was its number?":
Without filters the script must over-fetch (
-L 50) and reimplement thematching in
jqfor every call site, and the 50-row clamp means a busy repo canpush the run you want off the page entirely.
Proposed shape
--status <queued|in_progress|success|failure|cancelled|...>,--branch <name>,--event <name>, and--workflow <file>tofj run list.the Forgejo schema variants the struct already tolerates (newer builds also
accept some of these as server-side query params on
actions/runs; use themas an optimization where present, but don't depend on them for correctness).
--jsonand-L.Scope
Filtering over already-modeled fields; no new endpoint required. Independent of
the truncation/pagination work (rasterstate/fj#107 / #111), which addressed
how many rows, not which rows.
Converted to backlog item rasterstate/fj#138 (p2, size M).