GITHUB_TOKEN not accessable from fork, how to replace

Hello guys.

I created a very simple notifier, which uses the GITHUB_TOKEN variable to send a message in the PR concersation whenever a file in a folder changes. This works perfectly fine from PR from different branches, but fails when the PR originates from a fork with the error_Resource not accessible by integration_. example.

Now I did some research. This article states that I can access the token from a fork, but this one says that the token only has read permission when originating from a fork. So I am going to assume that I need issue write permission to create a message in the PR conversation, right?

If that is correct, my question is how to proceed. Do I need to create a Github App? It sounds appropriate, but it looks a bit complicated and I would love to see a better solution.

Hi @poolitzer ,

As github stuff replied here, it’s not supported/planed to give forks the ablity to write to main repo directly. I assume there’s no easy way to comment the pull request from forked repo, thanks.

1 Like

Hey @weide-zhou,

thanks for that, I know now that I can’t use actions directly then, great.