Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions Needed for pr-labeler? #57

Closed
danyeaw opened this issue Apr 21, 2022 · 1 comment · Fixed by #59
Closed

Permissions Needed for pr-labeler? #57

danyeaw opened this issue Apr 21, 2022 · 1 comment · Fixed by #59

Comments

@danyeaw
Copy link
Contributor

danyeaw commented Apr 21, 2022

To improve security of our repo, we recently set the default permissions for the token for the repository to read only to the contents scope. I am now trying to open backup permissions for this action so that it can write the label to the PR, but I am not having success. First I tried:

name: PR Labeler
on:
  pull_request_target:
    types: [opened]

permissions:
  pull_request: write

Then I tried adding issues write since I saw the octokit function being called was in the issues section. Finally I changed it to permissions: write-all. When I try to open a pull request I am getting:

Error: HttpError: Resource not accessible by integration
Error: Resource not accessible by integration

Do you know what specific permissions this action needs, and could we please document it in the README?

danyeaw added a commit to danyeaw/pr-labeler-action that referenced this issue May 3, 2022
@adrianthedev
Copy link

We have the same issue on https://github.com/avo-hq/avo with forks. All PRs coming from forks fail this action with HttpError: Resource not accessible by integration.

I'd appreciate any guidance on how to make that work. Thanks!

https://github.com/avo-hq/avo/actions/runs/3072986671/jobs/4964828955

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants