build: stop running PR title check on synchronize#203
Open
nielspardon wants to merge 1 commit into
Open
Conversation
The PR title check only validates the PR title and description, neither of which changes on a push (synchronize). Including synchronize caused a race with Dependabot rebases, which force-push and edit the PR body at the same time, firing synchronize and edited together. Both events land in the same concurrency group, so one run is cancelled, leaving a cancelled check-run on the head commit that fails the status rollup even though a successful run exists. Trigger only on opened, edited, and reopened -- the events that actually change the title or description.
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.
Problem
The PR Title Check registers as failing on some PRs even though the title conforms — see #198. The check ends up with two check-runs of the same name on the head commit, one
SUCCESSand oneCANCELLED, and GitHub's status rollup treats the cancelled one as not-passing.Root cause
When Dependabot rebases a PR it force-pushes a new commit and updates the PR body in the same instant. That fires two
pull_request_targetevents nearly simultaneously:synchronize— from the force-pushedited— from the body updateBoth resolve to the same concurrency group (
PR Title Check-<pr number>), socancel-in-progress: truecancels the first run when the second starts. Both runs had already created check-runs with identical names, leaving a danglingCANCELLEDcheck-run alongside the successful one on the head commit.The concurrency config works as intended for superseding older commits; it only backfires when two events land on the same commit.
Fix
The check only validates the PR title and description, and neither changes on a push. So
synchronizeis both semantically unnecessary and the specific trigger racing againstedited. Trigger only onopened,edited, andreopened— the events that actually change what's being validated.🤖 Generated with AI