Skip to content

Bail out of fork pull request closes at the event gate - #1880

Merged
flowzone-app[bot] merged 1 commit into
masterfrom
kyle/fork-close-noop
Aug 13, 2026
Merged

Bail out of fork pull request closes at the event gate#1880
flowzone-app[bot] merged 1 commit into
masterfrom
kyle/fork-close-noop

Conversation

@klutchell

Copy link
Copy Markdown
Contributor

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.

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>
@flowzone-app

flowzone-app Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Website deployed to CF Pages, 👀 preview link https://687b598f.flowzone.pages.dev

@flowzone-app
flowzone-app Bot enabled auto-merge August 10, 2026 21:01
@klutchell
klutchell requested a review from ab77 August 12, 2026 19:38
@flowzone-app
flowzone-app Bot merged commit 36af370 into master Aug 13, 2026
71 checks passed
@flowzone-app
flowzone-app Bot deleted the kyle/fork-close-noop branch August 13, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants