From f194c428d5e730c491b6ab54af047bf47b294dd7 Mon Sep 17 00:00:00 2001 From: Robert Lin Date: Tue, 14 Dec 2021 08:52:57 -0800 Subject: [PATCH] workflows: remove automerge action for other automerge methods (#28993) --- .github/workflows/automerge.yml | 34 --------------------------- .github/workflows/licenses-update.yml | 11 ++++++++- renovate.json | 4 ++-- 3 files changed, 12 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index 2e8fb69136b..00000000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,34 +0,0 @@ -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: pascalgn/automerge-action@v0.12.0 - env: - MERGE_LABELS: automerge - MERGE_METHOD: squash - MERGE_RETRIES: 1 - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - with: - args: "--trace" diff --git a/.github/workflows/licenses-update.yml b/.github/workflows/licenses-update.yml index e593d758f39..8d26290a44b 100644 --- a/.github/workflows/licenses-update.yml +++ b/.github/workflows/licenses-update.yml @@ -29,8 +29,9 @@ jobs: - name: Preview report diff run: git --no-pager diff - - name: Open pull request + - name: Create pull request uses: peter-evans/create-pull-request@v3 + id: cpr with: labels: automerge base: main @@ -47,3 +48,11 @@ jobs: # currently @sourcegraph-bot cross-repo-github-actions in 1password # configure in https://github.com/sourcegraph/sourcegraph/settings/secrets/GH_REPO_TOKEN token: ${{ secrets.GH_REPO_TOKEN }} + + - name: Enable pull request automerge + if: steps.cpr.outputs.pull-request-operation == 'created' + uses: peter-evans/enable-pull-request-automerge@v1 + with: + token: ${{ secrets.GH_REPO_TOKEN }} + pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} + merge-method: squash diff --git a/renovate.json b/renovate.json index 97082786b9a..0ee586b4a6f 100644 --- a/renovate.json +++ b/renovate.json @@ -1,7 +1,7 @@ { "$schema": "http://json.schemastore.org/renovate", "extends": ["github>sourcegraph/renovate-config"], - "semanticCommits": false, + "semanticCommits": "disabled", "rebaseWhen": "never", "packageRules": [ { @@ -27,7 +27,7 @@ "packagePatterns": ["^alpine:3.12"], "fileMatch": ["^Dockerfile$"], "paths": ["docker-images/**"], - "labels": ["automerge"] + "automerge": true } ] }