Closed TheOddler closed 1 year ago
For the POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
endpoint you need the repository administration write permission, I'm not sure if that one is even available to the GITHUB_TOKEN
provide to actions by default. You might need to use a personal access token or your own app for which you generate an installation access token with something like https://github.com/tibdex/github-app-token
Yea, looks like that was it, can't use the GITHUB_TOKEN
for this :( I needed a personal access token with full access permission.
I'm trying to write a GitHub action that temporarily disabled merging by requiring admin access. so I wrote an action like this:
However, when I run this I get the error "Resource not accessible by integration". From what I could find online it might be a permission problem, but I set the github token to have read/write access:
I enabled debug info, but it didn't tell me much new, other than that I'm getting a 403 error from github:
What am I missing?