From f0c9f3b0e3732f6f31fde354afab2eb2ddebb536 Mon Sep 17 00:00:00 2001 From: Michael Beaumont Date: Mon, 27 Jul 2020 12:37:24 +0200 Subject: [PATCH] Add workflow to auto merge PRs --- .github/workflows/auto-merge.yaml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/auto-merge.yaml diff --git a/.github/workflows/auto-merge.yaml b/.github/workflows/auto-merge.yaml new file mode 100644 index 0000000000..4a991dd518 --- /dev/null +++ b/.github/workflows/auto-merge.yaml @@ -0,0 +1,38 @@ +name: automerge +on: + pull_request_target: + 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 + steps: + - name: automerge + uses: "JakeChampion/automerge-action@e2f6d39bda" + env: + MERGE_LABELS: "" + MERGE_METHOD: "merge" + MERGE_METHOD_LABELS: "automerge=merge,autosquash=squash" + MERGE_METHOD_LABEL_REQUIRED: "true" + # Will automatically update the head branch with + # base branch changes + # At the moment, it needs to be a separate label + UPDATE_LABELS: "autoupdate" + # This is OK because weaveworksbot only has write permissions + # if it were an admin, it might override the checks/reviews + # see pascalgn/automerge-action#65 + GITHUB_TOKEN: "${{ secrets.WEAVEWORKSBOT_TOKEN }}"