Seen while planning: GET /api/v1/repos/:owner/:name/issues/:number/comments is no_route, so an agent that wants a long thread must read the whole issue (about 500 KB for #334).
Done:
[ ] The route answers {comments: [...], next: <id or null>}, oldest first, limit 1 to 100 (default 50) and after a comment id. Bad values are a 422. Read access is the same as the issue's, and an outsider's comment carries untrusted: true as it does in the issue read.
[ ] Pulls answer the same at their number.
[ ] Tests: paging 120 comments in three calls gives each once, in order; a private repository is not found; limit=0 is a 422.
Files: src/http/api.ts (one new handler), src/contract/openapi.ts, a test.
Risk: #4104 edits the issue read beside it; rebase if it lands first.
Before pushing: bun x tsc --noEmit and the tests named here.
Seen while planning:
GET /api/v1/repos/:owner/:name/issues/:number/commentsisno_route, so an agent that wants a long thread must read the whole issue (about 500 KB for #334).Done:
{comments: [...], next: <id or null>}, oldest first,limit1 to 100 (default 50) andaftera comment id. Bad values are a 422. Read access is the same as the issue's, and an outsider's comment carriesuntrusted: trueas it does in the issue read.limit=0is a 422.Files: src/http/api.ts (one new handler), src/contract/openapi.ts, a test. Risk: #4104 edits the issue read beside it; rebase if it lands first. Before pushing:
bun x tsc --noEmitand the tests named here.