- 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
2.4 KiB
spec, blocked-by
| spec | blocked-by |
|---|---|
| gitea-axi | 0004-issue-create-and-comment |
What to build
pr list, introducing two policies that later slices reuse: client-side filtering with its count-line rule (see ADR 0005) and the reviewDecision computation via parallel review fetches (see ADR 0006).
API-supported flags: --state, --author (maps to poster), --label (name→ID via the case-insensitive label lookup, since the PR list endpoint takes label IDs), --label-id (Gitea-specific bypass), --sort (Gitea-specific values passed straight to the API), --limit, --fields.
Client-side filters (no API param exists): --assignee, --base, --head, --draft — each paginates fully at 50 per page and filters in-process, with the count line's T computed from the filtered set instead of the misleading X-Total-Count.
Default fields: number, title, state, author, draft (bool→yes/no), review — the reviewDecision mapped to approved/changes_requested/required.
reviewDecision uses the official-first fallback: only official reviews count when any exist, otherwise all reviews; CHANGES_REQUESTED beats APPROVED, non-stale non-dismissed approval wins, everything else is required; there is no none value.
--search is forbidden with a redirect to search prs.
Acceptance criteria
pr listrenders the default fields withreviewcomputed from one parallel review fetch per PR- reviewDecision honors the official-first fallback and maps to the three lowercase values, with zero-review and comment-only PRs rendering
required --labelresolves the name case-insensitively to an ID (VALIDATION_ERRORif unknown);--label-idbypasses the lookup--authorand--sortmap to their API params;--sortaccepts the six Gitea values--assignee,--base,--head, and--draftfilter client-side after full pagination, and the count line reportscount: N of T totalwithTfrom the in-memory filtered set--fieldsexposesbody,createdAt,labels,milestone,mergedAt,url--searchfails withVALIDATION_ERROR(exit 2) pointing atgitea-axi search prs "<query>"- Empty result emits
pull_requests[0]: (none)plus a suggestion - Fixture-server tests cover the review computation variants (official/unofficial, stale, dismissed), each client-side filter with its count line, the label lookup, and the forbidden flag