Files
gitea-axi/.claude/tasks/0016-search-commands.md
alexion d03a079854 docs: adopt Conventional Commits and land planning docs
- CONVENTIONAL-COMMITS.md: vendored spec (v1.0.0); CLAUDE.md requires
  agent-written commits to follow it
- tasks 0002-0020: remaining task breakdown of the gitea-axi spec
  (0019 reframed around the three-tier test taxonomy: unit,
  integration, end-to-end)
- spec, CONTEXT.md, and ADRs 0006/0007/0011: pending design
  refinements from the planning sessions
2026-07-11 07:14:39 -04:00

1.5 KiB

spec, blocked-by
spec blocked-by
gitea-axi 0008-pr-list

What to build

The full-text escape hatch: search issues <query> and search prs <query>, the destination of the forbidden --search redirects. Both hit Gitea's repo-issues search endpoint with the query, a type of issues or pulls, and the owner param; since the endpoint has no repo-name filter, results are filtered client-side to the current repository via each result's repository field, following the client-side filtering policy including its count-line rule. The positional query is required (VALIDATION_ERROR if missing). Flags: --state (default open), --label (comma-separated names, API-supported), --limit (default 30), --fields. Both commands use the locator schema (number, title, state, author, created) — search finds the number, issue view/pr view load the detail — and output blocks issues:/pull_requests: matching the list commands.

Acceptance criteria

  • search issues "<query>" and search prs "<query>" query the search endpoint with the right type and owner, then filter to the current repo client-side
  • The count line reports count: N of T total with T from the client-side-filtered set
  • A missing query yields VALIDATION_ERROR (exit 2)
  • --state, --label, --limit, and --fields work; default fields are the locator schema
  • Empty results emit the standard <noun>[0]: (none) empty state
  • Fixture-server tests cover both types, cross-repo results being filtered out, and the missing-query validation