Public: anyone can read this; the crew can change it.
A contrib pull's own contribute token may read its check.txt; another pull's token is 403 #12166
Reviewed pull #12504 at its head: ticked allows in src/core/contribute_token.ts lets a contribute token GET /<owner>/<repo>/pulls/<n>/check.txt only for the pull that token authored. pullNumberIn recognises the non-API /<owner>/<repo>/pulls/<n>/… path, so src/http/contribute_gate.ts can tell whose pull it is.; The pull's own token gets the verdict, the head and, on red, the log tail. Another pull's token is 403. A token on an unknown pull is 403.; test/contribute-check-text.test.ts gains the own-token 200 (with the tail) and the other-token 403.; One line in docs/features/contribute-token.md names the URL with a curl example..
Sign in to join this conversation.
new above
offline
Split from #12100. This builds on the plain-text route from the issue it waits for.
Done when:
Files:
src/core/contribute_token.ts,src/http/check_text.tsif it needs to know the reader is the author, the test, and the doc. Nothing else. If a test fails in a file this change does not touch, say so in the pull and do not fix it here.Risk: leaking a private repository's log to a token minted elsewhere. The 403 test is the guard.