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 updating release plan when labels are changed on previously-merged PRs #123

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

kategengler
Copy link
Contributor

Using the pull_request event to trigger the workflow when labels are added on PRs from forks runs into permissions issues when the workflow attempts to open or update the release plan PR. This is because PR workflows from forks do not get repo secrets.

The pull_request_target event allows triggering a workflow upon an event on a PR from a fork but does include the secrets. It is not safe to run code from the PR in this workflow and the workflow that runs is from the base branch. Since this workflow only pulls the primary branch, this is safe to use. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

This can be seen working here:

kategengler/test-rp-new#1

Action that ran when the label was changed on the PR https://github.com/kategengler/test-rp-new/actions/runs/9684295098

@mansona
Copy link
Member

mansona commented Jul 1, 2024

I've tested this locally and I'm really happy with it 🎉 I'm setting it as a breaking change because it's a big change in behaviour, though in reality it's not depended on directly so we don't need to follow semver rules 😂

Thanks for solving this one @kategengler 🎉

@mansona mansona merged commit 7178b50 into embroider-build:main Jul 1, 2024
6 checks passed
@github-actions github-actions bot mentioned this pull request Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants