-
Notifications
You must be signed in to change notification settings - Fork 427
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
Resource not accessible by integration
when trying examples
#42
Comments
For the time being, this is the case if the PR is from a fork of the repository. It's on the roadmap to change how that works, but currently that example will not function unless the PR is from a collaborator. I'm going to consider removing the example until that's fixed. |
Dues to actions/github-script#42, we have to operate on issues instead. Related to #203
This creates problems with PRs created from forks as described here (actions/github-script#42) and using it on only issues is useless as the labels it acts on are only relevant to PRs.
@jclem Would it be possible to keep this issue open until that's possible? Just to have a place to follow along. Edit: Can be done with on:
pull_request_target: |
I solved this by going to Settings > Actions and giving read + write permissions to workflows. |
I solved it by adding below lines in the workflow permissions:
pull-requests: 'write' |
Pull requests from forks do not have write permission, so we need to use `pull_request_target` instead of `pull_request` to enable write permission. Fixes actions#42.
Namely, I am trying the Welcome a first-time contributor example, but I suspect because it operates on a PR, it gets a read-only token, and therefore it fails. Or am I missing something else?
The text was updated successfully, but these errors were encountered: