issue list: add --label, --search, --page filters #5

Open
opened 2026-05-16 11:53:29 +02:00 by heiko · 1 comment
Owner

The mod-nag workflow in workflows/.forgejo/workflows/mod-nag.yaml needs to search issues by label + free-text query + walk pages to find existing/stale findings. Today these calls still need raw curl, because fj issue list only takes --state and --limit.

To replace the remaining curl calls in mod-nag with fj, the following flags would be needed on fj issue list (and the issues alias):

  • --label <name> (repeatable) — filter by one or more label names, forwarded as labels=<id,id,...> after resolving names to IDs via FetchLabels.
  • --search <query> / -q <query> — full-text search forwarded as q=<urlencoded>.
  • --page <n> — explicit page number, combined with the existing --limit, to walk all results.

A --json already exists globally and is what mod-nag consumes; these new filters just need to flow into the query path.

Context: workflows uses these for:

  • searching open + closed issues by title fragment (vuln ID, module path)
  • paginating the full open-issue list scoped to mod-nag label for stale-cleanup

Endpoint shape (forgejo GET /repos/{owner}/{repo}/issues):

type=issues&state=<state>&labels=<id,id>&q=<text>&limit=<n>&page=<n>
The mod-nag workflow in `workflows/.forgejo/workflows/mod-nag.yaml` needs to search issues by label + free-text query + walk pages to find existing/stale findings. Today these calls still need raw `curl`, because `fj issue list` only takes `--state` and `--limit`. To replace the remaining curl calls in mod-nag with `fj`, the following flags would be needed on `fj issue list` (and the `issues` alias): - `--label <name>` (repeatable) — filter by one or more label names, forwarded as `labels=<id,id,...>` after resolving names to IDs via `FetchLabels`. - `--search <query>` / `-q <query>` — full-text search forwarded as `q=<urlencoded>`. - `--page <n>` — explicit page number, combined with the existing `--limit`, to walk all results. A `--json` already exists globally and is what mod-nag consumes; these new filters just need to flow into the query path. Context: workflows uses these for: - searching open + closed issues by title fragment (vuln ID, module path) - paginating the full open-issue list scoped to `mod-nag` label for stale-cleanup Endpoint shape (forgejo `GET /repos/{owner}/{repo}/issues`): type=issues&state=<state>&labels=<id,id>&q=<text>&limit=<n>&page=<n>
Author
Owner

AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex

AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex
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
heiko/fj#5
No description provided.