fix(copilot): explain review request denials instead of forwarding a bare 404
The review request endpoint requires write access to the repository, and GitHub refuses a caller without it with 404 Not Found rather than a permission error. Authoring the pull request does not grant that access, so a fork contributor can be offered a Copilot review by the web UI and still be refused by request_copilot_review, with nothing in the tool result to say why. On 403 or 404 the tool now reads the repository once so it can name the cause. A caller without write access is told so directly and pointed at the web UI. When the repository cannot be read at all, or when write access is present, the message says so and points at the likelier cause.
D
Dylan Pulver committed
e95b7fda29e5fdee470f58fddffcbbeae8f6c7fb
Parent: 0bb1e56
Committed by Sam Morrow <sammorrowdrums@github.com>
on 8/19/2026, 2:59:02 PM