srggrs / assign-one-project-github-action

Automatically add an issue or pull request to specific GitHub Project(s) when you create and/or label them.
MIT License
169 stars 60 forks source link

Add support for 'pull_request_target' event #62

Closed mondeja closed 3 years ago

mondeja commented 3 years ago

We are trying to run this workflow in simple-icons configuring the token for an organization and we should use the event pull_request_target because we need to give the permission of change project labels to pull requests events opened by external users from their forks, so this pull adds the support for that event.

This could explain #57, but I'm not sure.

ericcornelissen commented 3 years ago

This could explain #57, but I'm not sure.

Chiming in here to say that this will probably solve #57, as it is appears to be the same problem as simple-icons is having :+1: I also think it's a solution for #49

OrkoHunter commented 3 years ago

We are running this GitHub Actions in https://github.com/backstage/backstage and it works all well, unless a contributor creates a PR from a fork, where there is no GitHub token.

Adding support for pull_request_target looks like a fix! @srggrs Please take a look when you can 🙏

srggrs commented 3 years ago

Sorry guys I've been swamped with running multiple projects at the same time, and balance private life. I'm merging this and creating a new release. I also planning 2 new features:

srggrs commented 3 years ago

@mondeja @ericcornelissen @OrkoHunter the new release is published on GitHub Market