From 512e56d3aa7935000222e2ce9a05109248cd0ff2 Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Wed, 22 Apr 2026 01:57:43 +0300 Subject: [PATCH] Cancel stale On PR runs so only current HEAD determines status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a concurrency group on the On PR workflow with cancel-in-progress: true. Context: the upstream-release-docs workflow pushes multiple commits in quick succession to a Renovate PR branch — the skill's content commit, then a prettier/eslint autofix commit that cleans any formatting drift the skill introduced. Without concurrency, the On PR workflow runs fully on each intermediate commit and the first one (pre-autofix) can fail lint. The failure lingers in the check history even though the final commit passes. With cancel-in-progress, when the autofix commit lands, the stale On PR run on the skill commit is cancelled. Only the final run determines the check status. Matches standard GitHub Actions practice for PR CI. Concurrency group is keyed on pull_request.number so PRs can't cancel each other's runs. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/on-pr.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 01787a99..55b5a4be 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -6,6 +6,17 @@ on: permissions: contents: read +# Cancel stale runs so only the PR's current HEAD determines the +# check status. Matters specifically for PRs where the +# upstream-release-docs workflow pushes multiple commits +# in quick succession (skill output + prettier/eslint autofix): the +# intermediate commits briefly fail lint until the autofix lands, +# and without cancel-in-progress those intermediate failures stay +# in the check history. +concurrency: + group: on-pr-${{ github.event.pull_request.number }} + cancel-in-progress: true + jobs: static-checks: name: Static checks