Skip to content

[codex] Guard Dependabot auto-merge head SHA#65

Draft
Pigbibi wants to merge 1 commit into
mainfrom
codex/dependabot-head-sha-guard
Draft

[codex] Guard Dependabot auto-merge head SHA#65
Pigbibi wants to merge 1 commit into
mainfrom
codex/dependabot-head-sha-guard

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • fetch the open Dependabot PR headRefOid when resolving the workflow-run branch
  • skip auto-merge if the current PR head does not match the completed CI run head
  • pass --match-head-commit to gh pr merge to prevent merging an untested updated head

Root cause

The Dependabot auto-merge workflow was triggered by a successful workflow_run, but the merge command did not bind the merge to the exact commit that passed CI. If Dependabot pushed a newer commit between CI completion and the merge step, the workflow could merge a head that was not the one just checked.

Validation

  • actionlint .github/workflows/dependabot_auto_merge.yml
  • git diff --check

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