What is the correct permission to get access to pull request checks?

51 Views Asked by At

I have a curl command that returns a 403 when I try to access this specific url:

https://api.github.com/repos/{org}/{repo}/commits/{sha}/check-runs

According to the docs: https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#list-check-runs-for-a-git-reference I need a checks:read permission.

However, running the curl command I get a 403 response and this response header: x-accepted-github-permissions: checks=read

So, I am confident my PAT is working as I can do other calls and this response confirms my incorrect permissions.

So what additional permission do I need to grant my PAT so this command will run successfully?

1

There are 1 best solutions below

0
Nathan Feger On

The answer as of 2024-03-28, which is confirmed via support ticket from Github, is that this cannot be done with a Peronal Access Token(PAT). We can update this answer in the future when they turn it back on.