Merge pull request #3343 from openimsdk/cherry-pick-ad8829c

build: keep conflict is true. [Created by @mo3et from #3103]
This commit is contained in:
chao 2025-05-15 09:39:28 +08:00 committed by GitHub
commit aa2d336ce3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,14 +113,26 @@ jobs:
echo "Cherry-picking commit: $merge_commit" echo "Cherry-picking commit: $merge_commit"
if ! git cherry-pick "$merge_commit" --strategy=recursive -X theirs; then if ! git cherry-pick "$merge_commit" --strategy=recursive -X theirs; then
echo "Cherry-pick encountered conflicts, attempting to continue..." echo "Cherry-pick encountered conflicts, attempting to resolve..."
git cherry-pick --continue || { echo "Cherry-pick failed"; exit 1; } git status --porcelain | grep '^UU ' | cut -c 4- | while read -r file; do
echo "Resolving conflict in $file"
git add "$file"
done
git status --porcelain | grep '^AA ' | cut -c 4- | while read -r file; do
echo "Adding new file $file"
git add "$file"
done
git status --porcelain | grep '^DD ' | cut -c 4- | while read -r file; do
echo "Removing deleted file $file"
git rm "$file"
done
git cherry-pick --continue || { echo "Cherry-pick failed"; continue; }
fi fi
git remote set-url origin "https://${BOT_TOKEN}@github.com/${{ github.repository }}.git" git remote set-url origin "https://${BOT_TOKEN}@github.com/${{ github.repository }}.git"
echo "Pushing branch: $cherry_pick_branch" echo "Pushing branch: $cherry_pick_branch"
git push origin $cherry_pick_branch --force || { echo "Push failed"; exit 1; } git push origin $cherry_pick_branch --force || { echo "Push failed"; continue; }
new_pr_title="$pr_title [Created by @$pr_creator from #$pr_number]" new_pr_title="$pr_title [Created by @$pr_creator from #$pr_number]"
new_pr_body="$pr_body new_pr_body="$pr_body