ci: add workflow to auto-approve and auto-merge Dependabot PRs (#95)

Dependabot PRs currently require manual approval and merge. This workflow
automatically approves and enables squash-merge for Dependabot PRs once
all required status checks pass.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christopher BrownandClaude Opus 4.6 authored and GitHub committed 2026-10-01 13:20:55 +01:00
1 parent 0d998b783c
commit 737d60649d
1 file changed
+23
@@ -0,0 +1,23 @@
name: Dependabot auto-merge
on: pull_request
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Approve PR
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
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}