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

A sealed pull's diff and files answer whoever may see it, and 404 to everyone else #15008

shipped production is serving it opened this has it

Landed in pull #15015 · run

opened this

Split from #14917 (part 1), so each pull stays under the gate's "small and single-purpose" limit.

A sealed pull's diff and files answer on the same routes as any pull — GET /api/v1/repos/<owner>/<name>/pulls/<n>/diff, …/files, and the web /<owner>/<name>/pulls/<n>.diff — to whoever mayView the pull, read from its sealed fork (pullDir), and 404 to everyone else.

A first take is commit bb4bddcbf on branch mason/14917-the-reviewer-reads-a-sealed-pull-s-code (src/http/api/pull_diff.ts, two openapi route files, src/git/diff.ts); its three new modules are one more than the gate allows, so fold the openapi entries or the handler.

Done when: a test seals a pull from a builder's sealed fork and the diff route answers a reviewer 200 (text/plain, the hunk) and a stranger or signed-out caller 404.

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs