checks-action
checks-action copied to clipboard
Error: Resource not accessible by integration
I think this might be because the action requires certain permissions. I can't find these documented. It may be worth adding something about them.
Hi,
Are you referring to https://github.com/LouisBrunner/checks-action/issues/35?
This happens for PRs created by Dependabot also.
Yes, this is due to the token having different permissions, did you check this issue linked in #35? https://github.com/actions/first-interaction/issues/10#issuecomment-1232740076
I didn't spot that issue as it's closed. But my PR is not coming from a fork. It's from a different branch in the same repo. In any case, if permissions are required. Would it be worth documenting them?
Sure thing, feel free to open a PR to update the documentation.
I still haven't quite figured out which permissions are required. I haven't got this working yet. I'll see if I can find some time to try again and if I get it working, will add more docs.
I added this at the top of my file:
permissions:
checks: write
contents: read
write
permissions for checks
as by default it's readonly
, and contents
set to read
because when you set any permissions the rest default to none
I believe it is possible to make the token more permissible by default, but doing this instead is safer, and safer still would be to do it per-job for only the jobs that need it.