diff --git a/.github/allowed-actions.js b/.github/allowed-actions.js index efe48d0cf068..66c06473dce2 100644 --- a/.github/allowed-actions.js +++ b/.github/allowed-actions.js @@ -23,7 +23,7 @@ module.exports = [ 'juliangruber/approve-pull-request-action@v1', 'juliangruber/find-pull-request-action@v1', 'juliangruber/read-file-action@v1', - 'pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a', + 'pascalgn/automerge-action@c9bd182', 'peter-evans/create-issue-from-file@v2', 'peter-evans/create-pull-request@v2', 'rachmari/actions-add-new-issue-to-column@v1.1.1', diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index be58649fc820..a581bfb68fe3 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -20,18 +20,17 @@ on: jobs: automerge: runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'automerge') + if: contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash') steps: - name: automerge - uses: "pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a" + uses: "pascalgn/automerge-action@c9bd182" env: GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}" - MERGE_LABELS: "automerge" - MERGE_REMOVE_LABELS: "" + MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash" MERGE_COMMIT_MESSAGE: "pull-request-title" MERGE_METHOD: "merge" MERGE_FORKS: "true" MERGE_RETRIES: "50" - MERGE_RETRY_SLEEP: "10000" - UPDATE_LABELS: "automerge" + MERGE_RETRY_SLEEP: "10000" # ten seconds + UPDATE_LABELS: "automerge,autosquash" UPDATE_METHOD: "merge" diff --git a/.github/workflows/autosquash.yml b/.github/workflows/autosquash.yml deleted file mode 100644 index 2ff83b152fc2..000000000000 --- a/.github/workflows/autosquash.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: autosquash -on: - pull_request: - types: - - labeled - - unlabeled - - synchronize - - opened - - edited - - ready_for_review - - reopened - - unlocked - pull_request_review: - types: - - submitted - check_suite: - types: - - completed - status: {} -jobs: - automerge: - runs-on: ubuntu-latest - if: contains(github.event.pull_request.labels.*.name, 'autosquash') - steps: - - name: autosquash - uses: "pascalgn/automerge-action@135f0bdb927d9807b5446f7ca9ecc2c51de03c4a" - env: - GITHUB_TOKEN: "${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}" - MERGE_LABELS: "autosquash" - MERGE_REMOVE_LABELS: "" - MERGE_COMMIT_MESSAGE: "pull-request-title" - MERGE_METHOD: "squash" - MERGE_FORKS: "true" - MERGE_RETRIES: "50" - MERGE_RETRY_SLEEP: "10000" - UPDATE_LABELS: "automerge" - UPDATE_METHOD: "merge"