ci(sync-patches): guard conflict-resolution path against empty commits#3124
Merged
caio-pizzol merged 1 commit intomainfrom May 4, 2026
Merged
ci(sync-patches): guard conflict-resolution path against empty commits#3124caio-pizzol merged 1 commit intomainfrom
caio-pizzol merged 1 commit intomainfrom
Conversation
When all stable->main conflicts are in release-managed files (package.json versions, etc.) and auto-resolution keeps main's version for every one, the index becomes clean. The unguarded git commit then exits 1 and the workflow run shows red despite stable and main being correctly in sync. Mirror the existing 'no changes to sync' guard from the no-conflict path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sync-patches workflow has two paths for merging stable into main: a clean-merge path and a conflict-resolution path. Both eventually call
git commit. The clean-merge path checksgit diff --cached --quietfirst and exits early if nothing is staged, but the conflict-resolution path doesn't.That gap surfaced after PR #3123 merged: the only conflicts were release-managed files (package.json versions, etc.), all auto-resolved to main's version, leaving the index clean. The bare
git committhen exited 1 and the run went red, even though stable and main were correctly in sync (run https://github.com/superdoc-dev/superdoc/actions/runs/25338598551).This adds the same early-exit guard to the conflict-resolution path. No behavior change when there's actually content to sync.