Skip to content

Commit f6da485

Browse files
fix: auto-resolve merge conflicts with upstream version
1 parent 235f7d1 commit f6da485

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/translate-digest.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,21 @@ jobs:
3131
git remote add upstream https://github.com/duanyytop/agents-radar.git || true
3232
git fetch upstream master
3333
LOCAL=$(git rev-parse HEAD)
34-
git merge upstream/master --no-edit --allow-unrelated-histories || true
34+
git merge upstream/master --no-edit --allow-unrelated-histories || {
35+
echo "Merge conflict detected — auto-resolving with upstream version..."
36+
git checkout --theirs .
37+
git add -A
38+
git commit --no-edit
39+
}
3540
AFTER=$(git rev-parse HEAD)
3641
if [ "$LOCAL" != "$AFTER" ]; then
3742
echo "Upstream merged — pushing..."
38-
git pull --rebase origin master
43+
git pull --rebase origin master || {
44+
echo "Rebase conflict — resolving with upstream..."
45+
git checkout --theirs .
46+
git add -A
47+
git rebase --continue
48+
}
3949
git push
4050
else
4151
echo "Already up to date with upstream."

0 commit comments

Comments
 (0)