Fix releases for PRs from forks#99
Merged
johnboyes merged 1 commit intoSpectoLabs:mainfrom Mar 21, 2025
johnboyes:fix-release-process-from-forks
Merged
Fix releases for PRs from forks#99johnboyes merged 1 commit intoSpectoLabs:mainfrom johnboyes:fix-release-process-from-forks
johnboyes merged 1 commit intoSpectoLabs:mainfrom
johnboyes:fix-release-process-from-forks
Conversation
The [issue][1] was that a new release was not being created properly when the PR came from a fork. The fix is to trigger the release process on [`pull_request_target`][2] rather than `pull_request`. There are some [security concerns][3] to be aware of when using `pull_request_target`, but they are not applicable to our use case here, as we only trigger it when the PR is closed (which means no danger that a malicious actor could run malicious code without it having been reviewed). [1]: https://github.com/SpectoLabs/hoverfly-github-action/actions/runs/13983200352 [2]: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target [3]: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue was that a new release was not being created properly
when the PR came from a fork.
The fix is to trigger the release process on
pull_request_targetrather than
pull_request. There are some security concerns to beaware of when using
pull_request_target, but they are not applicableto our use case here, as we only trigger it when the PR is closed (which
means no danger that a malicious actor could run malicious code
without it having been reviewed).