Skip to content

Commit 339acc4

Browse files
committed
ci(sync-patches): squash-merge stable into main to avoid commit noise
Use git merge --squash so the sync PR has a single commit instead of replaying all accumulated stable commits, which triggered semantic-release comments on each one.
1 parent 25fe9f3 commit 339acc4

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/sync-patches.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,17 @@ jobs:
3939
SYNC_BRANCH="sync/stable-to-main-$(date +%Y%m%d-%H%M%S)"
4040
git checkout -b "$SYNC_BRANCH" origin/main
4141
42-
# Merge stable into the branch
43-
if git merge origin/stable --no-edit -m "chore: merge stable into main"; then
42+
# Squash-merge stable into the branch so the sync PR has a single commit
43+
# (avoids triggering semantic-release comments on every accumulated commit)
44+
if git merge --squash origin/stable; then
4445
# Check if there are actually new commits to sync
45-
if git diff --quiet origin/main; then
46+
if git diff --cached --quiet; then
4647
echo "No changes to sync — stable and main are already in sync."
4748
exit 0
4849
fi
4950
51+
git commit -m "chore: merge stable into main"
52+
5053
git push origin "$SYNC_BRANCH"
5154
5255
# Check for existing open sync PR
@@ -88,7 +91,7 @@ jobs:
8891
8992
# Check if all conflicts are resolved
9093
if [ -z "$(git diff --name-only --diff-filter=U)" ]; then
91-
git commit --no-edit
94+
git commit -m "chore: merge stable into main (release conflicts auto-resolved)"
9295
git push origin "$SYNC_BRANCH"
9396
9497
gh pr create \

0 commit comments

Comments
 (0)