Bail out of fork pull request closes at the event gate - #1880
Merged
Conversation
GitHub withholds secrets from every fork pull_request action, including the close, so `trusted` is false on that run and there is no outcome it can reach. When the PR merged, the fork-merge push lane starts in parallel and does the work with secrets. When it did not merge, there is nothing to clean up: a fork drafted no release or artifact, and github_clean and custom_clean require `trusted` regardless. The close still spent a run on versioned_source (executing versionist and then writing nothing, every app-token step being gated on `trusted`), octoscan, file_list, and the is_* detectors, duplicating jobs the push lane re-runs anyway. Veto it in event_types instead. pull_request_target is excluded from the veto so its close still reaches the `Reject pull_request_target events` step and fails loudly, rather than disappearing as a skipped run. Change-type: patch Signed-off-by: Kyle Harding <kyle@balena.io>
klutchell
force-pushed
the
kyle/fork-close-noop
branch
from
August 10, 2026 20:56
3e4cfa6 to
57411d4
Compare
Contributor
|
Website deployed to CF Pages, 👀 preview link https://687b598f.flowzone.pages.dev |
ab77
approved these changes
Aug 13, 2026
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.
GitHub withholds secrets from every fork pull_request action, including the close, so
trustedis false on that run and there is no outcome it can reach. When the PR merged, the fork-merge push lane starts in parallel and does the work with secrets. When it did not merge, there is nothing to clean up: a fork drafted no release or artifact, and github_clean and custom_clean requiretrustedregardless.The close still spent a run on versioned_source (executing versionist and then writing nothing, every app-token step being gated on
trusted), octoscan, file_list, and the is_* detectors, duplicating jobs the push lane re-runs anyway. Veto it in event_types instead.pull_request_target is excluded from the veto so its close still reaches the
Reject pull_request_target eventsstep and fails loudly, rather than disappearing as a skipped run.