Closed ardalis closed 1 year ago
Check your Settings > Actions > General > Workflow permissions Older repos don't, but the latest default is read, so you need to change it to read and write.
oh.. I read the pr and the user has no privileges in the repo. In that case, you're right that they can't do it. In my case, I separated it to run in different privileges check my settings: https://github.com/marocchino/sticky-pull-request-comment/blob/0c53bc8d62642be4955925aac529c75077e44828/.github/workflows/test.yml#L19-L23 https://github.com/marocchino/sticky-pull-request-comment/blob/0c53bc8d62642be4955925aac529c75077e44828/.github/workflows/comment_on_workflow_run.yml#L1-L32
Oh so it's expected that this won't work if random GitHub users make pull requests to open source projects, unless I set up something like what you're showing here? Most of my community contributors will have zero affiliation with or permissions on the repo. I'm not sure I understand what your workflows are doing but I'll take a closer look and see how I might apply that to my situation. Thanks!
It wasn't like that when I first created this repo, but there was a policy change in the Github API itself. you can found details in: https://github.com/marocchino/sticky-pull-request-comment/issues/227 and discussions will be helpful. https://github.com/community/community/discussions?discussions_q=Error%3A+Resource+not+accessible+by+integration+label%3AActions
GitHubExplore the GitHub Discussions forum for community/community. Discuss code, ask questions & collaborate with the developer community.
See this PR: https://github.com/ardalis/GuardClauses/pull/264
I'm getting this result:
Per the README in this repo, the fix for this is to not explicitly use
secrets.GITHUB_TOKEN
but that's not in my build.yml file anywhere.What else is suggested?
Here's my build script which has write permissions set:
Thanks!