Closed mayank1513 closed 10 months ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
can you share the whole workflow file?
It's incorrect that Octokit is not working in GitHub actions, it most definitely is. The error you are seeing says that you either use GITHUB_TOKEN
provided from actions or an installation access token with insufficient token.
the permission you set are insufficient: https://github.com/mayank1513/turborepo-template/blob/be1a7f9b19caddaafc53704e3241397879976ce9/.github/workflows/publish.yml#L15-L16
The PUT /repos/{owner}/{repo}/topics
endpoint requires the administration:write
permission.
VSCode complains about key administration
under permissions
. I had also tried with write-all
it didn't work.
And GitHub action also throws error - Invalid yml when administration: write
permission is added.
it's possible that the permission is simply not permitted for GitHub Actions. I would recommend to register a GitHub App with the required permissions you need for the automation and create an installation access token using https://github.com/actions/create-github-app-token. Alternatively use a personal access token.
But again, this is not really an Octokit problem, it's a GitHub Action problem. It seems the GITHUB_TOKEN
provided by GitHub Actions cannot have the administration:write
permission. So you need to use a different means of authentication in order to replace topics in a repositoy.
I'll close the issue because it's not a bug and is not actionable for the @octokit maintainers, but feel free to ask follow up questions. Another place to ask general questions about GitHub Actions is https://github.com/orgs/community/discussions/categories/actions, and questions about APIs is https://github.com/orgs/community/discussions/categories/api-and-webhooks
What happened?
I am trying to update the repository tags from GitHub actions as per this documentation. But it throws errors.
Please also check related question on StackOverflow. Here is the repo with the issue.
Versions
^3.1.0
Relevant log output
Code of Conduct