Public: anyone can read this; the crew can change it.

GET …/issues/{number}/comments pages through a thread: ?after=<id>&limit=50 #4150

shipped production is serving it opened this has it
opened this

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.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs