Skip to content

fix(ci): gate Dependabot auto-merge on CI passing - #19

Open
pnehrer wants to merge 2 commits into
mainfrom
fix/dependabot-auto-merge
Open

fix(ci): gate Dependabot auto-merge on CI passing#19
pnehrer wants to merge 2 commits into
mainfrom
fix/dependabot-auto-merge

Conversation

@pnehrer

@pnehrer pnehrer commented Jun 16, 2026

Copy link
Copy Markdown
Member

Problem

The existing workflow uses on: pull_request and gh pr merge --auto --squash.
Without branch protection rules, --auto merges immediately rather than
waiting for CI to pass — Dependabot PRs were being squash-merged the moment
the workflow ran, before Rust CI had a chance to complete (or even start).

Fix

Switch the trigger to on: workflow_run targeting Rust CI. The job runs
only when the CI workflow completes successfully and the triggering event
was a pull_request from dependabot[bot]. The merge step is still gated by
the existing patch/minor semver check (no major bumps).

Key differences from the old approach:

Before After
Trigger pull_request workflow_run (after Rust CI completes)
CI gate None (merged immediately) conclusion == 'success' required
Actor check github.actor == 'dependabot[bot]' in if: workflow_run.actor.login == 'dependabot[bot]'
PR lookup Direct (github.event.pull_request) Resolved from head_sha via API
Semver scope patch + minor patch + minor (unchanged)

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Line coverage: 85%
Lines covered: 86
Lines missed: 15
Total lines: 101

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