From 9720a8be0cfa5beb820f592b42471b6ded780362 Mon Sep 17 00:00:00 2001 From: Grace Do Date: Wed, 9 Oct 2024 11:47:26 -0700 Subject: [PATCH] ci(automerge): Update/fix automerge workflow (#2702) --- .github/workflows/automerge.yaml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/automerge.yaml b/.github/workflows/automerge.yaml index 55982e2a4..0e1d03421 100644 --- a/.github/workflows/automerge.yaml +++ b/.github/workflows/automerge.yaml @@ -9,12 +9,6 @@ on: - edited - ready_for_review - reopened - - unlocked - branches: - - main - - 'release/*' - paths: - - 'services/**/*' check_suite: types: - completed @@ -24,15 +18,15 @@ jobs: automerge: runs-on: ubuntu-latest steps: - - name: Enable auto-merge for automated chart bump PRs + - name: Enable auto-merge for automated chart bump PRs or label id: automerge if: | - startsWith(github.head_ref, 'chartbump/') + (startsWith(github.head_ref, 'chartbump/') || contains(github.event.pull_request.labels.*.name, 'auto-merge')) && contains(github.event.pull_request.labels.*.name, 'ready-for-review') && !contains(github.event.pull_request.labels.*.name, 'do-not-merge') && !contains(github.event.pull_request.labels.*.name, 'do-not-merge/testing') - && !contains(github.event.pull_request.labels.*.name, 'let-me-merge-it') + && !contains(github.event.pull_request.labels.*.name, 'let-me-merge-it')) run: gh pr merge --auto --squash "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.MERGEBOT_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}