Skip to content

Prevent pre-existing Dependabot auto-merge from suppressing main CI - #530

Merged
0thernet merged 1 commit into
mainfrom
fix/dependabot-preexisting-automerge-7fea1ea9
Oct 18, 2026
Merged

0thernet merged 1 commit into
mainfrom
fix/dependabot-preexisting-automerge-7fea1ea9

Conversation

@0thernet

Copy link
Copy Markdown
Member

Why

A pre-existing Dependabot auto-merge request can merge with GITHUB_TOKEN as soon as the PR Required check passes, racing the app-token workflow_run merge and suppressing Check on the new main commit. PR #521 had a green PR-head check, but its exact main SHA has no Check/Required run.

Change

  • On Check requested, clear an existing auto-merge request only for an open, same-repo Dependabot PR at the exact checked head, with a separate pull-requests: write cleanup job.
  • Hold the PR Required gate (read-only token) until no competing request remains; fail closed on stale heads or unsuccessful cleanup.
  • Keep the completed-phase exact-head, successful-Check merge through the existing app token; do not expose the app secret to PR CI.

Validation

  • python3 -I .github/scripts/dependabot-auto-merge.test.py (9 passed)
  • actionlint .github/workflows/ci.yml .github/workflows/dependabot-auto-merge.yml
  • git diff --check and git diff --cached --check

Live acceptance requires the next naturally qualifying Dependabot merge to produce a successful Check/Required run on its exact main SHA; this PR alone does not establish that. No release or host-install claim is made.

@vercel

vercel Bot commented Oct 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
xcb Ignored Ignored Oct 18, 2026 10:43pm UTC

Request Review

@0thernet
0thernet enabled auto-merge (squash) October 18, 2026 22:43
@0thernet
0thernet merged commit 803e532 into main Oct 18, 2026
19 checks passed
@0thernet
0thernet deleted the fix/dependabot-preexisting-automerge-7fea1ea9 branch October 18, 2026 22:50
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