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
32 changes: 32 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Dependabot auto-merge

# Turns on GitHub's native auto-merge for Dependabot pull requests, so a PR whose
# every required status check passes merges itself instead of waiting for a human.
# Branch protection still fully gates the merge — nothing red lands, and required
# checks/reviews are still enforced.
#
# Scope: minor and patch updates only. Major bumps are left open for a human to read
# the changelog first. Uses only the automatic GITHUB_TOKEN — no PAT or extra secrets.
# Requires "Allow auto-merge" in Settings > General (enabled for this repo).

on: pull_request

permissions:
contents: write # enable auto-merge on the PR
pull-requests: write # required by gh pr merge

jobs:
auto-merge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Fetch Dependabot metadata
id: meta
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0

- name: Enable auto-merge for non-major updates
if: steps.meta.outputs.update-type != 'version-update:semver-major'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}