REST API returns 404 when trying to get pull request comments #213137
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
Hi, I can't confirm the exact cause, but I have a likely suspect. Temporary private forks are restricted on purpose. GitHub's docs say integrations, CI included, can't access them, and status checks don't run on their pull requests. They don't list every API limitation, but some maintainers note that Issues can't be enabled on these forks. On a normal repo, PR comments go through the issues comments endpoint, so if the fork has Issues switched off, that route could return 404 even though the PR itself exists. You can check this from your side with the same token:
If it does turn out to be the Issues setting, it might be worth trying the GraphQL API (pullRequest(number: 1) { comments { ... } } on the fork). I haven't tested that against a temporary fork, so I don't know whether it's handled any differently, but it's a cheap thing to try. Either way, I'd say the bug report still stands. The PR comments are visible in the UI, so either the REST API should return them or the docs should say the endpoint isn't supported for temporary private forks. A clear 404 with no explanation isn't great. Side note: probably worth rotating that token if the full value ever ended up anywhere outside your machine, even though it's redacted here. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Bug
Body
In order to get pull request comments (not review comments), you'd normally use List issue comments endpoint (
/repos/{owner}/{repo}/issues/{issue_number}/comments). However, for temporary private forks, this returns a 404:All reactions