Skip to content

Commit

Permalink
build: improve workflows contents. (#3082)
Browse files Browse the repository at this point in the history
  • Loading branch information
mo3et authored and OpenIM-Robot committed Feb 8, 2025
1 parent 5c192d0 commit 5a97e8b
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/merge-from-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,33 +113,14 @@ jobs:
echo "Cherry-picking commit: $merge_commit"
if ! git cherry-pick "$merge_commit" --strategy=recursive -X theirs; then
echo "Conflict detected for $merge_commit. Resolving with incoming changes."
conflict_files=$(git diff --name-only --diff-filter=U)
echo "Conflicting files:"
echo "$conflict_files"
for file in $conflict_files; do
if [ -f "$file" ]; then
echo "Resolving conflict for $file"
git add "$file"
else
echo "File $file has been deleted. Skipping."
git rm "$file"
fi
done
echo "Conflicts resolved. Continuing cherry-pick."
git cherry-pick --continue || { echo "Cherry-pick failed, but continuing to create PR."; }
else
echo "Cherry-pick successful for commit $merge_commit."
echo "Cherry-pick encountered conflicts, attempting to continue..."
git cherry-pick --continue || { echo "Cherry-pick failed"; exit 1; }
fi
git remote set-url origin "https://${BOT_TOKEN}@github.com/${{ github.repository }}.git"
echo "Pushing branch: $cherry_pick_branch"
if ! git push origin $cherry_pick_branch --force; then
echo "Push failed, but continuing to create PR..."
fi
git push origin $cherry_pick_branch --force || { echo "Push failed"; exit 1; }
new_pr_title="$pr_title [Created by @$pr_creator from #$pr_number]"
new_pr_body="$pr_body
Expand Down

0 comments on commit 5a97e8b

Please sign in to comment.