Skip to content

build: stop running PR title check on synchronize#203

Open
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:fix/pr-title-check-synchronize-race
Open

build: stop running PR title check on synchronize#203
nielspardon wants to merge 1 commit into
substrait-io:mainfrom
nielspardon:fix/pr-title-check-synchronize-race

Conversation

@nielspardon

Copy link
Copy Markdown
Member

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 SUCCESS and one CANCELLED, 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_target events nearly simultaneously:

  • synchronize — from the force-push
  • edited — from the body update

Both resolve to the same concurrency group (PR Title Check-<pr number>), so cancel-in-progress: true cancels the first run when the second starts. Both runs had already created check-runs with identical names, leaving a dangling CANCELLED check-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 synchronize is both semantically unnecessary and the specific trigger racing against edited. Trigger only on opened, edited, and reopened — the events that actually change what's being validated.

🤖 Generated with AI

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant