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

Support for pull_request_target event #9

Closed
Dasch0 opened this issue Aug 25, 2020 · 1 comment · Fixed by #12
Closed

Support for pull_request_target event #9

Dasch0 opened this issue Aug 25, 2020 · 1 comment · Fixed by #12
Assignees

Comments

@Dasch0
Copy link

Dasch0 commented Aug 25, 2020

Hello,

First off, this is an excellent script and has been a huge help to me. However I ran into a small issue on GitHub's end when using it.

The pull_request event has a number of limitations for use with Github actions, especially regarding pull requests from forked repositories. This is described in detail in the link below:
https://git.luolix.topmunity/t/github-actions-are-severely-limited-on-prs/18179

As a fix, Github recently added the pull_request_target event type, which fixes all of the issues described above. Documentation for pull_request_target is shown below:
https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target

This event behaves almost exactly the same as pull_request as far as this script is concerned. In fact if the error checking is changed to allow for pull_request_target as the event type, this script works properly as is. See a proof of concept in this fork:

https://github.com/silabs-DavidS/close-pull-request-target

As this repo is the top result on the marketplace for closing pull requests, I think a new release that allows for the pull_request_target event would be great to have.

Best,
David

@superbrothers
Copy link
Owner

@Dasch0 I've changed to use pull_request_target event instead, and released v3.0.0. Thank you so much for your comment!

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

Successfully merging a pull request may close this issue.

2 participants