Repository navigation
ci: run PR Checks only for open PRs and for edits that change what they check - #181
Merged
Merged
Conversation
…ey check PR Checks ran on every "edited" event. Editing a description re-ran all five jobs and, through the shared concurrency group, cancelled the PR's in-progress code checks. Editing a merged PR failed commitlint with "Invalid revision range", because the deleted head branch isn't in the checkout. - Every job requires an open PR. - On "edited", the title check runs only if the title or base changed, and the code checks only if the base changed. - Edits use their own concurrency group, so they never cancel code checks. Signed-off-by: Michael Oliver <mcoliver@gmail.com>
mcoliver
force-pushed
the
ci/pr-checks-open-only
branch
from
October 26, 2026 20:14
1bd7bb3 to
82aded0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
Invalid revision range <base>..<head>commitlint failures, and stops description edits from re-running and cancelling PR checks.Cause:
pull_request: edited. Editing the description of a merged PR, such as the footer clean-up across ~60 old PRs today, started PR Checks on each one.fetch-depth: 0checkout doesn't contain the head SHA, andcommitlint --from base --to headfails. That's the 33 failed runs at 19:57 today.concurrency: pr-<n>withcancel-in-progress, it also cancelled the code checks already running.Change:
pull_request.state == 'open'.edited:pr-<n>-edit), so they never cancelpr-<n>-code.A skipped job reports as successful for required checks, so description edits no longer block or re-run anything.
Test: this PR's own run covers
opened. After merge, editing this PR's description should show every job as skipped.