From 7ffdba8cec3938d33c41dacbc26a5b082fb1463a Mon Sep 17 00:00:00 2001 From: Vladislav Byrgazov Date: Mon, 27 May 2024 12:16:07 +0500 Subject: [PATCH] Check and resolve conflicts on PR creation --- .github/workflows/pr-for-updates.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/pr-for-updates.yaml b/.github/workflows/pr-for-updates.yaml index 86c9ea96..1ea2e12c 100644 --- a/.github/workflows/pr-for-updates.yaml +++ b/.github/workflows/pr-for-updates.yaml @@ -9,3 +9,18 @@ jobs: uses: networkservicemesh/.github/.github/workflows/pr-for-updates.yaml@main secrets: token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} + + check-mergeability: + needs: [ auto-pull-request ] + uses: networkservicemesh/.github/.github/workflows/check-mergeability.yaml@main + secrets: + token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }} + + resolve_conflicts: + needs: [ check-mergeability ] + if: ${{ always() && needs.check-mergeability.result == 'failure' && needs.check-mergeability.outputs.pr_branch_ref != '' }} + uses: networkservicemesh/.github/.github/workflows/resolve-conflicts.yaml@main + with: + pr_branch_ref: ${{ needs.check-mergeability.outputs.pr_branch_ref }} + secrets: + token: ${{ secrets.NSM_BOT_GITHUB_TOKEN }}