From 00c4d8d207ffc080baa527e28dcf9f1869d73053 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 18 Jul 2026 17:08:24 +0200 Subject: [PATCH] ci(release): only cancel pull_request runs when cleaning up a closed PR A manually dispatched build on the same head branch is not the PR's work; filter the cancellation list by event so PR-close cleanup cannot abort it. Addresses Codex round-5 feedback on #1202. Co-Authored-By: Claude Fable 5 --- .github/workflows/cleanup-pr-draft.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cleanup-pr-draft.yml b/.github/workflows/cleanup-pr-draft.yml index 6123778f5..9cb435bc1 100644 --- a/.github/workflows/cleanup-pr-draft.yml +++ b/.github/workflows/cleanup-pr-draft.yml @@ -31,10 +31,13 @@ jobs: run: | set -euo pipefail + # --event pull_request: a manually dispatched build on the + # same branch is not this PR's work and must not be cancelled. list_active_runs() { gh run list --repo "${GITHUB_REPOSITORY}" \ --workflow 'Build and Make Electron App' \ --branch "${HEAD_BRANCH}" \ + --event pull_request \ --json databaseId,status \ --jq '.[] | select(.status == "queued" or .status == "in_progress" or .status == "waiting" or .status == "requested" or .status == "pending") | .databaseId' }