Skip to content

Auto-merge Dependabot security PRs for patch/minor bumps - #7

Merged
Cristian-Curaba merged 1 commit into
mainfrom
ci/dependabot-auto-merge
Sep 11, 2026
Merged

Auto-merge Dependabot security PRs for patch/minor bumps#7
Cristian-Curaba merged 1 commit into
mainfrom
ci/dependabot-auto-merge

Conversation

@Cristian-Curaba

Copy link
Copy Markdown
Collaborator

What

Dependabot security updates are already enabled and working (24/26 past alerts fixed via PRs it opened itself). What's missing is the merge step — every one of those PRs still needed a human to click merge.

This adds a workflow that auto-approves and enables auto-merge for a Dependabot PR, but only when:

  • the bump is patch or minor semver (a major bump — see Bump maplibre-gl from 5.24.0 to 6.4.1 in /CASCADE-app #5, maplibre-gl 5.x→6.x, currently failing CI — is left alone on purpose)
  • every existing CI check passes (.github/workflows/ci.yml) — this workflow enables GitHub's native auto-merge, it does not bypass or replace CI
  • the actor is dependabot[bot]

Before this merges

The repo's "Allow auto-merge" setting (Settings → General → Pull Requests) is currently off, and I could not flip it via the API (likely an org-level restriction, not something the token's permissions could override) — an org owner needs to turn it on for gh pr merge --auto to take effect. Until then this workflow approves the PR but the merge itself just waits.

Already done, not part of this PR

PR #6 (smol-toml, High severity, patch bump, CI fully green) was merged directly while investigating this — closing Dependabot alert #26.

🤖 Generated with Claude Code

Handles the merge step Dependabot's security updates leave to a human:
once it opens a PR for a vulnerability fixed by a version bump, this
approves and enables auto-merge -- but only for patch/minor semver
bumps, and only once every existing CI check (.github/workflows/ci.yml)
is green. Major bumps (see PR #5, maplibre-gl 5.x->6.x, currently
failing CI) are deliberately left for a human.

Requires the repo's "Allow auto-merge" setting (Settings > General >
Pull Requests), which is currently off and could not be flipped via
the API -- needs an org owner to enable it by hand.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Cristian-Curaba
Cristian-Curaba merged commit 6c0dafc into main Sep 11, 2026
4 checks passed
@Cristian-Curaba
Cristian-Curaba deleted the ci/dependabot-auto-merge branch September 11, 2026 08:34
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