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

feat: support pull_request_target #8

Merged
merged 1 commit into from
Mar 15, 2022

Conversation

carolynvs
Copy link
Contributor

The pull_request_target type uses the source code from the base ref of the pull request, not the contents of the pull request. When GitHub Actions runs this type, the secret given to the action has write permissions even when the pull request is from a forked repository. With the pull_request type, the secret only has read access due to security concerns.

By allowing a consumer of the action to use pull_request_target, they can now close issues when a pull request from a fork fixes an issue too.

Example:

on:
  pull_request_target:
    types: [closed]

@carolynvs carolynvs marked this pull request as ready for review March 15, 2022 13:40
@ldez ldez self-requested a review March 15, 2022 13:53
@ldez ldez added the enhancement New feature or request label Mar 15, 2022
Copy link
Owner

@ldez ldez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again 👍

The pull_request_target type uses the source code from the base ref of
the pull request, not the contents of the pull request. When GitHub
Actions runs this type, the secret given to the action has write
permissions even when the pull request is from a forked repository. With
the pull_request type, the secret only has read access due to security
concerns.

By allowing a consumer of the action to use pull_request_target, they
can now close issues when a pull request from a fork fixes an issue
too.

Example:

```yaml
on:
  pull_request_target:
    types: [closed]
```

Signed-off-by: Carolyn Van Slyck <[email protected]>
@ldez ldez force-pushed the pull_request_target branch from 4bde9e9 to 78be2d7 Compare March 15, 2022 14:09
@ldez ldez changed the title Support pull_request_target feat: support pull_request_target Mar 15, 2022
@ldez ldez merged commit 43ab6dc into ldez:master Mar 15, 2022
@carolynvs carolynvs deleted the pull_request_target branch March 15, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants