Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Dependabot auto-merge

# Enables GitHub's native auto-merge on Dependabot PRs for patch/minor bumps.
# The PR is only merged once every *required* status check on `main` passes
# (lint, build, e2e, audit) — auto-merge does the waiting; this workflow just
# turns it on. Major version bumps are left open for manual review.
# Approves and enables GitHub's native auto-merge on Dependabot PRs for
# patch/minor bumps. The approval satisfies the branch's "require 1 review"
# rule (human PRs still need a human reviewer); the merge then waits for every
# required status check (lint, build, e2e, audit) to pass. Major version bumps
# are left open for manual review — neither approved nor auto-merged.
on:
pull_request:
branches:
Expand All @@ -24,6 +25,15 @@ jobs:
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve non-major bumps
# The bot's approval satisfies the required review for Dependabot's own
# PRs; human PRs get no such approval and still need a human reviewer.
# Skipped for majors so those keep needing a genuine human approval.
if: ${{ steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge (squash) for non-major bumps
# Skip major version bumps — they can pass CI yet carry behavioral or
# API risk, so a human reviews and merges them. For grouped updates
Expand Down
Loading