From d89ca9baed823d10a44ffbab84d78c68807c8f31 Mon Sep 17 00:00:00 2001 From: Danil Silantyev Date: Sun, 26 Jul 2026 06:53:16 +0500 Subject: [PATCH] ci: subscribe ci-gate to merge_group and scope cancellation to PRs ci-gate is this repository's required context. GitHub never reports a required check to a merge queue unless the workflow subscribes to merge_group, so enabling the queue here would have left every queued PR waiting forever for a status that could not arrive. cancel-in-progress was unconditional. Cancelling a queued merge-group candidate or a main push makes branch protection observe a partial-cancel instead of a decisive result, so cancellation is now scoped to pull_request iterations. --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05bc28e..de98b6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,13 +5,22 @@ on: branches: [main] pull_request: branches: [main] + # ci-gate is this repository's required context. A required check is never + # reported to a merge queue unless its workflow subscribes to merge_group, + # so without this an enabled queue would wait forever for a status that can + # never arrive. + merge_group: + types: [checks_requested] workflow_dispatch: permissions: {} concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + # Cancel superseded PR iterations, but never a queued merge-group candidate + # or a main push: cancelling those makes branch protection observe a + # partial-cancel status instead of a decisive result. + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: validate: