Skip to content

Move Dependabot automerge behind completed required checks#206

Draft
Copilot wants to merge 1 commit into
dependabot/nuget/Microsoft.NET.Test.Sdk-18.6.0from
copilot/fix-ordering-issue
Draft

Move Dependabot automerge behind completed required checks#206
Copilot wants to merge 1 commit into
dependabot/nuget/Microsoft.NET.Test.Sdk-18.6.0from
copilot/fix-ordering-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

Dependabot automerge was running inside the same workflow that defines the required checks, so the merge action executed before those checks could become satisfied. This changes the merge trigger to run only after the Build and Test workflow completes successfully for a Dependabot PR.

  • Problem

    • automerge lived in build-and-test.yml, which made it part of the required-check set it was waiting on.
    • The result was a deadlock at merge time: 3 of 3 required status checks are expected.
  • Workflow split

    • Remove the automerge job from Build and Test.
    • Add a dedicated Dependabot automerge workflow triggered by workflow_run for the Build and Test workflow.
  • Merge gating

    • Run automerge only when the upstream workflow:
      • was triggered by pull_request
      • completed with success
      • was started by dependabot[bot]
      • is associated with a PR
  • PR targeting

    • Pass the PR number from the completed workflow run into fastify/github-action-merge-dependabot, so merge operates on the already-validated Dependabot PR rather than the in-flight workflow context.
on:
  workflow_run:
    workflows: [Build and Test]
    types: [completed]

jobs:
  automerge:
    if: >
      github.event.workflow_run.event == 'pull_request' &&
      github.event.workflow_run.conclusion == 'success' &&
      github.event.workflow_run.actor.login == 'dependabot[bot]'

Co-authored-by: BenjaminMichaelis <22186029+BenjaminMichaelis@users.noreply.github.com>
Copilot AI changed the title Fix Dependabot automerge workflow ordering Move Dependabot automerge behind completed required checks Jun 3, 2026
Copilot AI requested a review from BenjaminMichaelis June 3, 2026 02:48
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.

2 participants