Files
gitea-axi/test/fixtures/issues-fields.json
alexion 348f28a54d feat: complete issue list filters, sort, and fields (task 0002)
Finish the `issue list` flag surface left minimal by the tracer slice:

- Server-side filters `--label`, `--assignee`, `--author`, `--milestone`,
  mapped to Gitea's `labels`, `assigned_by`, `created_by`, `milestones`.
- Client-side `--sort <created|updated|comments>`, always descending, over
  the fully paginated set (ADR 0005); `--limit` caps the sorted result.
- `--fields` exposing body, closedAt, labels, milestone, updatedAt, url.
- `--search` refused with a VALIDATION_ERROR redirecting to `search issues`.

Exhaustive pagination lands as a shared `paginate.ts`, since ADR 0005 makes
it a policy later slices reuse; `lookup.ts` drops its hand-rolled copy of the
same loop. The helper carries the 20-page cap that copy encoded, matching the
1000-item ceiling Principle 8 sets.
2026-07-12 09:29:35 -04:00

35 lines
922 B
JSON

[
{
"id": 310,
"number": 50,
"title": "Ship the field extractors",
"body": "Raw body text, kept whole by the body field.",
"state": "closed",
"is_locked": false,
"comments": 1,
"created_at": "2026-06-01T10:00:00Z",
"updated_at": "2026-07-05T10:00:00Z",
"closed_at": "2026-07-06T10:00:00Z",
"html_url": "http://gitea.example/testowner/testrepo/issues/50",
"url": "http://gitea.example/api/v1/repos/testowner/testrepo/issues/50",
"user": {
"id": 9,
"login": "contributor",
"full_name": "A Contributor",
"email": "contributor@example.com"
},
"labels": [
{ "id": 1, "name": "bug", "color": "ee0701" },
{ "id": 3, "name": "priority: high", "color": "b60205" }
],
"milestone": {
"id": 4,
"title": "v1.0",
"state": "open"
},
"assignee": null,
"assignees": null,
"pull_request": null
}
]