- 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.0 KiB
spec, blocked-by
| spec | blocked-by | ||
|---|---|---|---|
| gitea-axi |
|
What to build
pr view <n> and pr checks <n>, built on the truncation machinery and the reviewDecision computation from earlier slices.
pr view always makes three API calls — the PR fetch and the reviews fetch in parallel, then the combined commit status once the head SHA is known — so default output includes number, title, state, author, draft, merged, checks, body (truncated at 500), comment_count, and review_count without extra flags.
The checks field renders as the summary string (N passed, N failed[, N skipped][, N pending], N total) or the explicit no-CI message; commit-status states map success→pass, failure/error/warning→fail, skipped→skip, pending→pending.
--reviews additionally fetches per-review inline comments and exposes Gitea-specific official and stale fields; --comments renders all comments at the 800-char truncation; --full suppresses all truncation.
pr checks <n> outputs the same summary line followed by a checks list of { name, conclusion }.
Acceptance criteria
pr view <n>renders the default fields includingchecks,comment_count, andreview_countfrom the three-call fetch pattern- Commit-status states map to the four conclusions per the spec,
warningcounting as failure - A PR with no statuses renders the
"0 passed, 0 failed — this PR has no CI checks configured"message in both commands --reviewslists reviews withofficialandstalefields plus their inline comments--commentsand--fullbehave as onissue view(800-char comment truncation with cleanBody;--fullsuppresses everything)pr checks <n>outputs the summary line followed by{ name, conclusion }rows- A nonexistent PR yields
PR_NOT_FOUND(exit 1) - Fixture-server tests cover the status mapping including
skippedandwarning, the no-CI case,--reviews, and truncation behavior