From 187894386301fc3882715a8a3e135212258a8ace Mon Sep 17 00:00:00 2001
From: Julian Gruber <julian@juliangruber.com>
Date: Mon, 15 Jan 2024 22:34:19 +0100
Subject: [PATCH] add auto approve updates

---
 .github/workflows/dependabot-auto-approve.yml | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 .github/workflows/dependabot-auto-approve.yml

diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-approve.yml
new file mode 100644
index 0000000..98aed08
--- /dev/null
+++ b/.github/workflows/dependabot-auto-approve.yml
@@ -0,0 +1,21 @@
+name: Dependabot auto-approve updates
+on: pull_request
+
+permissions:
+  pull-requests: write
+
+jobs:
+  dependabot:
+    runs-on: ubuntu-latest
+    if: ${{ github.actor == 'dependabot[bot]' }}
+    steps:
+      - name: Dependabot metadata
+        id: metadata
+        uses: dependabot/fetch-metadata@v1
+        with:
+          github-token: "${{ secrets.GITHUB_TOKEN }}"
+      - name: Approve a PR
+        run: gh pr review --approve "$PR_URL"
+        env:
+          PR_URL: ${{github.event.pull_request.html_url}}
+          GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}