From f46d9d9617194039925b6d4b40d3e6f739501dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Thu, 9 Nov 2023 11:39:04 +0800 Subject: [PATCH 1/2] fix: multiple merge conflicts --- .github/workflows/cherry-pick-rc-to-develop.yml | 9 +++++---- kalium | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cherry-pick-rc-to-develop.yml b/.github/workflows/cherry-pick-rc-to-develop.yml index 42f4eec0a8c..f44b01a1a02 100644 --- a/.github/workflows/cherry-pick-rc-to-develop.yml +++ b/.github/workflows/cherry-pick-rc-to-develop.yml @@ -30,7 +30,6 @@ on: - closed env: - TARGET_BRANCH: develop SUBMODULE_NAME: kalium @@ -119,7 +118,8 @@ jobs: OUTPUT=$(git cherry-pick ${{ env.cherryPickCommit }} || true) # Handle conflicts - CONFLICTED_FILES=$(git diff --name-only --diff-filter=U) + CONFLICTED_FILES=$(git diff --name-only --diff-filter=U | awk 'ORS="\\\\n"' | sed 's/\\\\n$/\\n/') + echo "Captured conflicted files: $CONFLICTED_FILES" if [[ "$OUTPUT" == *"CONFLICT"* ]]; then # Commit the remaining conflicts git commit -am "Commit with unresolved merge conflicts outside of ${{ env.SUBMODULE_NAME }}" @@ -139,5 +139,6 @@ jobs: PR_TITLE: ${{ github.event.pull_request.title }} PR_BRANCH: ${{ env.newBranchName }} PR_ASSIGNEE: ${{ github.event.pull_request.user.login }} - PR_BODY: "${{ format('Cherry pick from the original PR: \n- #{0}\n\n---- \n\n ⚠️ Conflicts during cherry-pick:\n{1}\n\n{2}', github.event.pull_request.number, env.conflictedFiles, github.event.pull_request.body) }}" - run: gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base ${{ env.TARGET_BRANCH }} --head "$PR_BRANCH" --label "cherry-pick" --assignee "$PR_ASSIGNEE" + run: | + PR_BODY=$(echo -e "Cherry pick from the original PR: \n- #${{ github.event.pull_request.number }}\n\n---- \n\n ⚠️ Conflicts during cherry-pick:\n${{ env.conflictedFiles }}\n\n${{ github.event.pull_request.body }}") + gh pr create --title "$PR_TITLE" --body "$PR_BODY" --base ${{ env.TARGET_BRANCH }} --head "$PR_BRANCH" --label "cherry-pick" --assignee "$PR_ASSIGNEE" diff --git a/kalium b/kalium index 33a635afc2d..236301686cd 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 33a635afc2de1aace06cfa61c53d4a58606b1283 +Subproject commit 236301686cd372c08abd68736b59b34c52218fea From 1c923e8f0b3212680d5f3fbde68645d315408d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20=C5=BBerko?= Date: Fri, 10 Nov 2023 09:35:56 +0800 Subject: [PATCH 2/2] kalium update --- kalium | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kalium b/kalium index 236301686cd..1321a907582 160000 --- a/kalium +++ b/kalium @@ -1 +1 @@ -Subproject commit 236301686cd372c08abd68736b59b34c52218fea +Subproject commit 1321a907582aa0b66bf715f48b3d11be708c4beb