From 6466a7fdde78b09ee9ffd3990cffa74e6f2769df Mon Sep 17 00:00:00 2001 From: Andrej Orsula Date: Mon, 11 Mar 2024 21:39:40 +0100 Subject: [PATCH] Squash Dependabot PRs Signed-off-by: Andrej Orsula --- .github/workflows/dependabot.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index b8349c1..fd2cedb 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -8,7 +8,10 @@ permissions: jobs: dependabot_automation: runs-on: ubuntu-latest - if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} + if: ${{ github.actor == 'dependabot[bot]' }} + env: + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + PR_URL: ${{github.event.pull_request.html_url}} steps: - name: Fetch metadata id: metadata @@ -16,12 +19,7 @@ jobs: with: github-token: "${{ secrets.GITHUB_TOKEN }}" - name: Approve the PR - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: gh pr review --approve "$PR_URL" + continue-on-error: true - name: Enable auto-merge for the PR - env: - PR_URL: ${{github.event.pull_request.html_url}} - GH_TOKEN: ${{secrets.GITHUB_TOKEN}} - run: gh pr merge --auto --merge "$PR_URL" + run: gh pr merge --auto --squash "$PR_URL"