Skip to content

Default Greeting workflow suddenly resulting in an error #25706

Discussion options

You must be logged in to vote

I’ll try to simplify it a bit:

Each workflow run automatically gets a thing called a GITHUB_TOKEN. That token is used for authentication, for example when your workflow creates a comment. When the workflow runs because of an issue or PR inside your repository, the token is allowed to make changes.

When a pull_request happens because of a PR from a fork, the token has read-only permissions. It can’t be used to make changes, so you can’t use it to write a comment. This is for security: With the pull_request event the workflow file is taken from the PR. Anyone can make a PR, and someone could edit the workflow file in the PR to do something bad.

There is another event called pull_request_target

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants