I want to find out if I have write access to a repository. Using a personal access token, that is simple enough, by reading out the scopes from the `X-OAuth-Scopes` response header or by reading the `permissions` key from the response of `GET /repos/:owner/:repo`.
But there is no such thing for GitHub installation tokens, is it?
My current problem is that I want to run [semantic-release](https://github.com/semantic-release/semantic-release) in GitHub Actions, and it verifies the authentication by sending the `GET /repos/:owner/:repo` request. But the `GITHUB_TOKEN` provided to GitHub Actions is in fact an installation token so this verification step fails.
Thanks for being here! You could try to fetch a list of repositories that the installation has access to:
The response is a JSON array, where each element is a repository including the `permissions` hash that you’re looking for. I hope this helps!
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!