diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index b5f8c496c..fce9694dc 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -44,11 +44,18 @@ jobs: - name: Create pull request id: create_pr - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: token: ${{ secrets.BOT }} - head: "$BRANCH_NAME" + branch: "$BRANCH_NAME" base: main title: "$BRANCH_NAME" body: "Generated from https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}." - auto-merge: true + + - name: Merge pull request + if: steps.create_pr.outputs.pull-request-operation == "created" + uses: peter-evans/enable-pull-request-automerge@v3 + with: + token: ${{ secrets.BOT }} + pull-request-number: ${{ steps.create_pr.outputs.pull-request-number }} + merge-method: squash