From 0296abe8180dfc931041a4d8f8634338f12c1184 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 00000000000..bc1c1dcc4cd --- /dev/null +++ b/.github/workflows/auto-merge.yaml @@ -0,0 +1,38 @@ +name: automerge +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 + steps: + - name: automerge + uses: "michaelbeaumont/automerge-action@merge_method_labels" + 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 }}"