feat: scaffold CLI and minimal issue list (task 0001)
Tracer bullet for gitea-axi: runnable npm package on axi-sdk-js with gitea-js as the sole HTTP layer, ESM on Node 20+. - issue list with --state/--limit, default fields, count line from X-Total-Count, type=issues guard, explicit empty state, and next-step suggestions - repo context detection from the git origin remote (SSH/scp/HTTPS), tea credential discovery with the three-way login-matching split, and -R/--repo and --login overrides (flag > env > auto) - token retrieval via tea login helper get: tea's login list JSON carries no token (ADR 0001 amended) - full AxiError classification table with path-based 404 split, TOON errors on stdout, exit codes 0/1/2 - test mode (GITEA_AXI_API_URL/TOKEN/REPO) suppressing subprocesses, fixture server, and vitest suites driving the CLI seam (50 tests)
This commit is contained in:
78
test/fixtures/issues-open.json
vendored
Normal file
78
test/fixtures/issues-open.json
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
[
|
||||
{
|
||||
"id": 301,
|
||||
"number": 42,
|
||||
"title": "Fix login redirect loop, please",
|
||||
"body": "Steps to reproduce: log in twice.",
|
||||
"state": "open",
|
||||
"is_locked": false,
|
||||
"comments": 2,
|
||||
"created_at": "2026-07-01T10:00:00Z",
|
||||
"updated_at": "2026-07-08T09:30:00Z",
|
||||
"html_url": "http://gitea.example/testowner/testrepo/issues/42",
|
||||
"url": "http://gitea.example/api/v1/repos/testowner/testrepo/issues/42",
|
||||
"user": {
|
||||
"id": 7,
|
||||
"login": "alexion",
|
||||
"full_name": "Alexion",
|
||||
"email": "alexion@example.com"
|
||||
},
|
||||
"labels": [
|
||||
{ "id": 1, "name": "bug", "color": "ee0701" }
|
||||
],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"pull_request": null
|
||||
},
|
||||
{
|
||||
"id": 302,
|
||||
"number": 41,
|
||||
"title": "Add dark mode",
|
||||
"body": "",
|
||||
"state": "open",
|
||||
"is_locked": false,
|
||||
"comments": 0,
|
||||
"created_at": "2026-06-20T15:45:00Z",
|
||||
"updated_at": "2026-06-20T15:45:00Z",
|
||||
"html_url": "http://gitea.example/testowner/testrepo/issues/41",
|
||||
"url": "http://gitea.example/api/v1/repos/testowner/testrepo/issues/41",
|
||||
"user": {
|
||||
"id": 9,
|
||||
"login": "contributor",
|
||||
"full_name": "A Contributor",
|
||||
"email": "contributor@example.com"
|
||||
},
|
||||
"labels": [],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"pull_request": null
|
||||
},
|
||||
{
|
||||
"id": 303,
|
||||
"number": 38,
|
||||
"title": "Docs: document the release process",
|
||||
"body": "The release process lives only in someone's head.",
|
||||
"state": "open",
|
||||
"is_locked": false,
|
||||
"comments": 5,
|
||||
"created_at": "2026-05-02T08:00:00Z",
|
||||
"updated_at": "2026-07-01T12:00:00Z",
|
||||
"html_url": "http://gitea.example/testowner/testrepo/issues/38",
|
||||
"url": "http://gitea.example/api/v1/repos/testowner/testrepo/issues/38",
|
||||
"user": {
|
||||
"id": 7,
|
||||
"login": "alexion",
|
||||
"full_name": "Alexion",
|
||||
"email": "alexion@example.com"
|
||||
},
|
||||
"labels": [
|
||||
{ "id": 2, "name": "documentation", "color": "0075ca" }
|
||||
],
|
||||
"milestone": null,
|
||||
"assignee": null,
|
||||
"assignees": null,
|
||||
"pull_request": null
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user