Skip to content

Commit d09f914

Browse files
rdimitrovclaude
andauthored
Cancel stale On PR runs so only current HEAD determines status (#775)
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) <noreply@anthropic.com>
1 parent f89e5b1 commit d09f914

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/on-pr.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ on:
66
permissions:
77
contents: read
88

9+
# Cancel stale runs so only the PR's current HEAD determines the
10+
# check status. Matters specifically for PRs where the
11+
# upstream-release-docs workflow pushes multiple commits
12+
# in quick succession (skill output + prettier/eslint autofix): the
13+
# intermediate commits briefly fail lint until the autofix lands,
14+
# and without cancel-in-progress those intermediate failures stay
15+
# in the check history.
16+
concurrency:
17+
group: on-pr-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
19+
920
jobs:
1021
static-checks:
1122
name: Static checks

0 commit comments

Comments
 (0)