diff --git a/.github/workflows/autobot.yml b/.github/workflows/autobot.yml index d20e692..81d554f 100644 --- a/.github/workflows/autobot.yml +++ b/.github/workflows/autobot.yml @@ -16,13 +16,19 @@ jobs: PR_URL: ${{ github.event.pull_request.html_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' + steps: - name: Fetch Dependabot metadata id: metadata + if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }} uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Enable auto-approve for Dependabot PRs + if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }} run: gh pr review --approve "${PR_URL}" + + - name: Enable auto-approve for Dependabot PRs + if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }} + run: gh pr merge --squash --auto "${PR_URL}" || gh pr merge --merge --auto "${PR_URL}" || gh pr merge --rebase --auto "${PR_URL}"