From d6e14f11ca3a181f3893d4ae369becbff97fbb86 Mon Sep 17 00:00:00 2001 From: Nick Watts <1156625+nawatts@users.noreply.github.com> Date: Mon, 22 Apr 2024 12:33:31 -0400 Subject: [PATCH] [AJ-1692] Auto approve Dependabot PRs (#53) --- .../workflows/auto-approve-dependabot-prs.yml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/auto-approve-dependabot-prs.yml diff --git a/.github/workflows/auto-approve-dependabot-prs.yml b/.github/workflows/auto-approve-dependabot-prs.yml new file mode 100644 index 0000000..2571c3a --- /dev/null +++ b/.github/workflows/auto-approve-dependabot-prs.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@v2 + 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 }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}