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

Doesn't work with GITHUB_TOKEN: "Resource not accessible by integration" #1673

Closed
alex1yaremchuk opened this issue Aug 8, 2024 · 2 comments

Comments

@alex1yaremchuk
Copy link

Hi!
From description it looks like that it should work with GITHUB_TOKEN, but it doesn't for me.

it seems that creating PAT is mandatory?

@peter-evans
Copy link
Owner

Hi @alex1yaremchuk

This normally occurs when using actions in pull_request workflows triggered by forks.

There's an explanation I wrote on the readme of this action:

Note: In public repositories this action does not work in pull_request workflows when triggered by forks. Any attempt will be met with the error, Resource not accessible by integration. This is due to token restrictions put in place by GitHub Actions. Private repositories can be configured to enable workflows from forks to run without restriction. See here for further explanation. Alternatively, use the pull_request_target event to comment on pull requests.

@alex1yaremchuk
Copy link
Author

Thank you for the explanation!

actually, in my case it was a direct push.
the repo was private at that moment.

it was in this repo:
https://github.com/alex1yaremchuk/first-pull-request

it worked when i set up PAT

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

No branches or pull requests

2 participants