question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GITHUB_TOKEN permissions that needs write access

See original GitHub issue

Since it’s now possible to control the permissions of the GITHUB_TOKEN on a job basis (https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/) it would be nice to know what permissions need write access to get this job to work.

I’ve currently set all of my repos permissions to read and then the job failed using this action with the following error image

After reading the readme I found that this is expected and is caused by not having the correct permissions. So it would be really awesome if it could be added to the readme what permissions are required to have write access for this action to work.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
samirergaibicommented, May 21, 2021

What worked for me in the end was setting the pull-requests scope to write permission.

permissions:
  pull-requests: write
0reactions
peter-evanscommented, May 22, 2021

I’ve updated the readme with details of the scopes required. Thank you for raising this and investigating!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatic token authentication - GitHub Docs
You can use the installation access token to authenticate on behalf of the GitHub App installed on your repository. The token's permissions are...
Read more >
GitHub Actions: Control permissions for GITHUB_TOKEN
GitHub Actions now lets you control the permissions granted to the GITHUB_TOKEN secret. The GITHUB_TOKEN is an automatically generated secret ...
Read more >
Token permissions for GitHub Actions - Damir's Corner
GitHub Actions provide a default GITHUB_TOKEN that can be used by steps in your workflow that require access to your GitHub repository.
Read more >
What permissions does GITHUB_TOKEN require for releases ...
To allow your GitHub Action creating a draft release, you will have to grant your GITHUB_TOKEN access to POST /repos/:owner/:repo/releases ...
Read more >
How it works, Change Permissions, Customizations - YouTube
We will also see of course what is GITHUB_TOKEN and how the GitHub token authentication works. EXCLUSIVE CONTENT Do you want...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found