From b29cbc6a4d8cf3b75388daa2a85d372363916af4 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Fri, 3 Jul 2026 01:02:33 +0200 Subject: [PATCH] Add Dependabot auto-merge workflow Approve and enable squash auto-merge for Dependabot PRs. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/dependabot-automerge.yml | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/dependabot-automerge.yml diff --git a/.github/workflows/dependabot-automerge.yml b/.github/workflows/dependabot-automerge.yml new file mode 100644 index 0000000..923091a --- /dev/null +++ b/.github/workflows/dependabot-automerge.yml @@ -0,0 +1,26 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + automerge: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Fetch metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Approve and enable auto-merge + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}