diff --git a/.github/workflows/auto-approve.yaml b/.github/workflows/auto-merge.yaml similarity index 68% rename from .github/workflows/auto-approve.yaml rename to .github/workflows/auto-merge.yaml index 174f6096..cc4b7bf8 100644 --- a/.github/workflows/auto-approve.yaml +++ b/.github/workflows/auto-merge.yaml @@ -1,7 +1,8 @@ -name: Dependabot auto-approve +name: Dependabot auto-merge on: pull_request permissions: + contents: write pull-requests: write jobs: @@ -11,11 +12,11 @@ jobs: steps: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.1.1 + uses: dependabot/fetch-metadata@v1 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Approve a PR - run: gh pr review --approve "$PR_URL" + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" env: PR_URL: ${{github.event.pull_request.html_url}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}