Skip to content

Commit

Permalink
build: keep conflict is true in pre release. (#3104)
Browse files Browse the repository at this point in the history
* build: improve workflows contents.

* build: keep conflict is true.
  • Loading branch information
mo3et authored Feb 8, 2025
1 parent 602b498 commit 5312089
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/merge-from-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,26 @@ jobs:
echo "Cherry-picking commit: $merge_commit"
if ! git cherry-pick "$merge_commit" --strategy=recursive -X theirs; then
echo "Cherry-pick encountered conflicts, attempting to continue..."
git cherry-pick --continue || { echo "Cherry-pick failed"; exit 1; }
echo "Cherry-pick encountered conflicts, attempting to resolve..."
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
git remote set-url origin "https://${BOT_TOKEN}@github.com/${{ github.repository }}.git"
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_body="$pr_body
Expand Down

0 comments on commit 5312089

Please sign in to comment.