From 7c48c48f94ec0a5aed695428e100b2b295969610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Schaffer?= Date: Fri, 6 Sep 2024 07:17:12 +0200 Subject: [PATCH] Update dependabot-auto-approve.yml to dependabot-auto-merge.yml (#280) * Update dependabot-auto-approve.yml to dependabot-auto-merge.yml * Auto approve pr for merge --- ...abot-auto-approve.yml => dependabot-auto-merge.yml} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename .github/workflows/{dependabot-auto-approve.yml => dependabot-auto-merge.yml} (53%) diff --git a/.github/workflows/dependabot-auto-approve.yml b/.github/workflows/dependabot-auto-merge.yml similarity index 53% rename from .github/workflows/dependabot-auto-approve.yml rename to .github/workflows/dependabot-auto-merge.yml index 180245b..1999b6d 100644 --- a/.github/workflows/dependabot-auto-approve.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -1,13 +1,14 @@ -name: Dependabot auto-approve +name: Dependabot auto-merge on: pull_request permissions: + contents: write pull-requests: write jobs: dependabot: runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' + if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == andreschaffer/http-caching-and-concurrency-examples' steps: - name: Dependabot metadata id: metadata @@ -19,3 +20,8 @@ jobs: env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}