Support 'pull_request' event type#3
Closed
hainest wants to merge 1 commit into
Closed
Conversation
I found that I was getting a pull_request[1] event, but not a pull_request_target[2] when creating a pull request on a test repo. The docs for each say that they are both fired when a PR is opened, so I'm not sure why I wasn't seeing both. Even though the 'pull_request' event uses the merge commit of the PR, github.event.pull_request.head.sha still refers to the last commit in the head branch of the PR. There is a lot of discussion about the security[3] of pull_request_target. In particular, the workflow uses the GITHUB_TOKEN from the base repository which may be overly permissive. This update does not attempt to address those concerns. [1] https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request [2] https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target [3] https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target
Member
|
The reason why |
Author
|
Per-job permissions are preferred for using the action. See tools-integration/tools-sdk#17. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found that I was getting a pull_request[1] event, but not a pull_request_target[2] when creating a pull request on a test repo. The docs for each say that they are both fired when a PR is opened, so I'm not sure why I wasn't seeing both.
Even though the 'pull_request' event uses the merge commit of the PR, github.event.pull_request.head.sha still refers to the last commit in the head branch of the PR.
There is a lot of discussion about the security[3] of pull_request_target. In particular, the workflow uses the GITHUB_TOKEN from the base repository which may be overly permissive. This update does not attempt to address those concerns.
[1] https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request
[2] https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_target
[3] https://docs.github.com/en/actions/reference/security/securely-using-pull_request_target