fix: handle pull_request_review events in fromFork() (#1038) - #1039
Open
aditya226-sharma wants to merge 2 commits into
Open
fix: handle pull_request_review events in fromFork() (#1038)#1039aditya226-sharma wants to merge 2 commits into
aditya226-sharma wants to merge 2 commits into
Conversation
seb4stien
approved these changes
Aug 21, 2026
Prettier required the multi-line if condition to be wrapped, which was failing the lint/check-dist CI job. Also simplified fromFork() by removing the now-redundant duplicate return branch for pull_request_review, since both branches used identical logic. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Test results for commit e5e9669Test coverage for e5e9669 Static code analysis report |
Contributor
Test results for commit e5e9669Test coverage for e5e9669 Static code analysis report |
Contributor
Test results for commit e5e9669Test coverage for e5e9669 Static code analysis report |
javierdelapuente
approved these changes
Aug 21, 2026
Contributor
|
@aditya226-sharma unfortunately we cannot merge an unsigned commit. Is it fine for you if we close this PR and open a separate one under our name? If not, can you please sign your commit? |
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.
Summary
Extends
fromFork()to also detect fork PRs when the workflow is triggered bypull_request_reviewevents, preventing image upload failures on PR approvals.Changes
pull_request_reviewto the accepted event names infromFork()pull_requestandpull_request_revieweventsWhy
When the workflow is triggered by
pull_request_review(e.g., on approval),context.eventNameis'pull_request_review'instead of'pull_request'. The old code returnedfalsefor any non-pull_requestevent, causing operator-workflows to default to registry (ghcr.io). In GitHub Actions, standardGITHUB_TOKENcredentials in workflow runs triggered by PR review events do not have permissions to write/create packages, resulting indenied: installation not allowed to Create organization packageerrors.Closes #1038