From f118c06d804d4b187ba89ba03b0c8741a4ee6407 Mon Sep 17 00:00:00 2001 From: Nikos Sklikas Date: Fri, 8 Sep 2023 19:55:35 +0300 Subject: [PATCH] Fix auto merge logic (#20) --- .github/workflows/auto-approver.yaml | 5 ++--- renovate.json | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/auto-approver.yaml b/.github/workflows/auto-approver.yaml index 4f8b24ad..792aa0cb 100644 --- a/.github/workflows/auto-approver.yaml +++ b/.github/workflows/auto-approver.yaml @@ -17,9 +17,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} - name: Enable automerge if required + if: startsWith(github.ref_name, 'renovate/auto-') run: | - if [[ $(gh pr view --json body | grep "\*\*Automerge\*\*: Enabled") ]]; then - gh pr merge --auto --merge || true - fi + gh pr merge --auto --merge || true env: GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} diff --git a/renovate.json b/renovate.json index 9e699d7f..d87ccaeb 100644 --- a/renovate.json +++ b/renovate.json @@ -13,5 +13,6 @@ ], "automergeType": "pr", "rebaseWhen": "behind-base-branch", - "automerge": true + "automerge": true, + "additionalBranchPrefix": "auto-" } \ No newline at end of file