From 90a553b66f466b2827c3d8ff43b72e2099c990eb Mon Sep 17 00:00:00 2001
From: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Date: Tue, 23 Aug 2022 14:30:59 +0400
Subject: [PATCH] fix backport shows generic error when conflicts (#24928)

---
 .github/workflows/auto-backport.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/auto-backport.yml b/.github/workflows/auto-backport.yml
index 52026788ec6..a363f7e8abf 100644
--- a/.github/workflows/auto-backport.yml
+++ b/.github/workflows/auto-backport.yml
@@ -67,12 +67,14 @@ jobs:
           COMMIT: ${{ steps.find_commit.outputs.commit }}
 
       - name: Auto approve backport PR
+        if: ${{ steps.create_backport_pull_request.outputs.has-conflicts == 'false' }}
         uses: juliangruber/approve-pull-request-action@v1
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           number: ${{ steps.create_backport_pull_request.outputs.backport_pr_number }}
 
       - name: Enable Pull Request Automerge
+        if: ${{ steps.create_backport_pull_request.outputs.has-conflicts == 'false' }}
         uses: peter-evans/enable-pull-request-automerge@v2
         with:
           token: ${{ steps.generate-token.outputs.token }}
-- 
GitLab