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

use pull_request_target and not pull_request for the safe workflows #138

Merged
merged 2 commits into from
Mar 15, 2021

Conversation

JakeChampion
Copy link
Contributor

We have workflows that currently fail to run correctly for pull-requests from forks or pull-requests from dependabot. The reason is because those workflows are being triggered by the 'pull_request' event, which does will use a restricted github api token for pull-requests from forks or dependabot for security reasons.

For our workflows which are 'safe' (meaning they do not checkout the code or execute the code in the repository), we can change their trigger from 'pull_request' to 'pull_request_target', which uses a github api token with more permissions, specifically it has permission to read/use secrets, which are the things are workflows require.

Our workflows are safe, they do not checkout or execute the code from the repository, so we should change to using pull_request_target to make our workflows work for dependabot and pull-requests from forks.

We have workflows that currently fail to run correctly for pull-requests from forks or pull-requests from dependabot. The reason is because those workflows are being triggered by the 'pull_request' event, which does will use a restricted github api token for pull-requests from forks or dependabot for security reasons.

For our workflows which are 'safe' (meaning they do not checkout the code or execute the code in the repository), we can change their trigger from 'pull_request' to 'pull_request_target', which uses a github api token with more permissions, specifically it has permission to read/use secrets, which are the things are workflows require.

Our workflows are safe, they do not checkout or execute the code from the repository, so we should change to using `pull_request_target` to make our workflows work for dependabot and pull-requests from forks.
@origamiserviceuser origamiserviceuser added this to incoming in Origami ✨ Mar 15, 2021
@github-actions github-actions bot added the cli Relates to an Origami cli label Mar 15, 2021
@JakeChampion JakeChampion marked this pull request as ready for review March 15, 2021 14:29
@JakeChampion JakeChampion requested a review from a team as a code owner March 15, 2021 14:29
@JakeChampion JakeChampion removed the request for review from a team March 15, 2021 14:29
@JakeChampion JakeChampion merged commit dd2d33b into master Mar 15, 2021
Origami ✨ automation moved this from incoming to complete Mar 15, 2021
@JakeChampion JakeChampion deleted the prt branch March 15, 2021 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Relates to an Origami cli
Projects
Origami ✨
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant