Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PR_COMMENT_CI): resolve snap conflicts #3443

Merged
merged 1 commit into from
Dec 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/pr-comment-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ jobs:
git status
conflict_count=$(git status | grep -c 'both modified:') || true
working_tree_clean=$(git status | grep -c 'nothing to commit, working tree clean') || true
csr_snap_conflict=$(git status | grep 'both modified:' | grep -c 'csr.test.jsx.snap') || true
ssr_snap_conflict=$(git status | grep 'both modified:' | grep -c 'ssr.test.jsx.snap') || true
csr_snap_conflict=$(git status | grep 'both modified:' | grep -c 'csr.test.js.snap') || true
ssr_snap_conflict=$(git status | grep 'both modified:' | grep -c 'ssr.test.js.snap') || true
common_conflict=$(git status | grep 'both modified:' | grep -c '_common') || true
conflicts_sum=$((csr_snap_conflict + ssr_snap_conflict + common_conflict))
echo "conflict_count: $conflict_count"
Expand All @@ -207,15 +207,15 @@ jobs:
fi

if [ "$csr_snap_conflict" -eq "1" ];then
git checkout --theirs test/snap/__snapshots__/csr.test.jsx.snap
git add test/snap/__snapshots__/csr.test.jsx.snap
echo "resolve conflict csr.test.jsx.snap"
git checkout --theirs test/snap/__snapshots__/csr.test.js.snap
git add test/snap/__snapshots__/csr.test.js.snap
echo "resolve conflict csr.test.js.snap"
fi

if [ "$ssr_snap_conflict" -eq "1" ];then
git checkout --theirs test/snap/__snapshots__/ssr.test.jsx.snap
git add test/snap/__snapshots__/ssr.test.jsx.snap
echo "resolve conflict ssr.test.jsx.snap"
git checkout --theirs test/snap/__snapshots__/ssr.test.js.snap
git add test/snap/__snapshots__/ssr.test.js.snap
echo "resolve conflict ssr.test.js.snap"
fi

if [ "$common_conflict" -eq "1" ];then
Expand Down
Loading