From a09627c78d97917443349a21d953be89bcb32eef Mon Sep 17 00:00:00 2001 From: ludamad Date: Tue, 20 Aug 2024 11:31:52 -0400 Subject: [PATCH] chore(sync-noir): fix modify/delete conflicts automatically (#8090) Truly fulfill '-X theirs' with https://stackoverflow.com/a/54232519 --- .github/workflows/pull-noir.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-noir.yml b/.github/workflows/pull-noir.yml index 042ebcb9929..c7f2d70b161 100644 --- a/.github/workflows/pull-noir.yml +++ b/.github/workflows/pull-noir.yml @@ -119,7 +119,11 @@ jobs: # Fix PR branch git fetch # see recent change git checkout $BRANCH || git checkout -b $BRANCH - git merge -Xtheirs origin/$STAGING_BRANCH -m "$COMMIT_MESSAGE" + if ! git merge -Xtheirs origin/$STAGING_BRANCH -m "$COMMIT_MESSAGE" ; then + # resolve modify/delete conflicts + git diff --name-only --diff-filter=U | xargs git rm + git commit -m "$COMMIT_MESSAGE" + fi git push origin $BRANCH } force_sync_staging