From 6eaf04107dee78a38c58a369e88b8157befb4615 Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 11 Apr 2022 20:03:37 +0200 Subject: [PATCH] Auto-approve dependabot PRs There is very little to be gained by having to approve those PRs, and it is a lot of UI interaction to get them approved. They still will need to be merged manually regardless, so they might as well be approved by a bot. --- .github/workflows/dependabot.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/dependabot.yml diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml new file mode 100644 index 000000000..174f6096e --- /dev/null +++ b/.github/workflows/dependabot.yml @@ -0,0 +1,21 @@ +name: Dependabot auto-approve +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.1.1 + 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}}