Skip to content

fix: open conflict sync PRs and comment [ED-25668] - #57

Merged
davseve merged 1 commit into
mainfrom
fix/sync-conflict-prs
Sep 28, 2026
Merged

davseve merged 1 commit into
mainfrom
fix/sync-conflict-prs

Conversation

@davseve

@davseve davseve commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Cherry-pick squash commits when syncing release branches, so binary files such as Playwright snapshots apply instead of failing with cannot apply binary patch without full index line.
  • When a sync conflicts, commit the conflicted tree and open the draft PR. Text files keep conflict markers. Binary files use the incoming version.
  • Skip opening a PR when that commit would be empty, which is what made GitHub reject the draft with No commits between.
  • Comment on the original PR when a downstream sync fails, including the git or GitHub error and the draft link when one was opened.

Test plan

  • Merge a squash PR into release/stable that changes a PNG snapshot and confirm sync PRs open against release/beta and main.
  • Force a text conflict and confirm the draft PR contains conflict markers plus a comment on the original PR with the cherry-pick error.
  • Confirm a clean sync does not comment on the original PR.

Made with Cursor

✨ PR Description

1. Problem & Context

The current sync process fails silently or provides poor visibility when merge conflicts occur. This update ensures conflict resolution is actionable by creating draft PRs and notifying the original PR author.

2. What Changed (Where)

  • actions/sync-release-branches/sync-release-branches.sh: Overhauled conflict handling, added binary conflict resolution, and implemented GitHub PR commenting.
  • actions/sync-release-branches/README.md: Updated documentation to reflect new conflict and notification behavior.

3. How It Works

The sync_to_target flow now captures detailed error output from git/GitHub operations. If apply_merged_content fails, create_conflict_pr handles binary files via --theirs and opens a draft PR. Finally, comment_on_original_pr posts the failure details and the draft PR link back to the source PR.

4. Risks

Github API rate limits or token permissions could cause gh pr comment or gh pr create to fail, though these are wrapped in warnings to prevent blocking the entire pipeline.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

Cherry-pick squash commits so binary files apply, and commit real conflicts so the draft PR is not empty. Post the git or GitHub error on the original PR when a downstream sync fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
@davseve davseve changed the title fix: Open conflict sync PRs and comment on the original PR fix: Open conflict sync PRs and comment on the original PR [ED-25668] Sep 28, 2026
@davseve davseve changed the title fix: Open conflict sync PRs and comment on the original PR [ED-25668] fix: open conflict sync PRs and comment on the original PR [ED-25668] Sep 28, 2026
@Ntnelbaba Ntnelbaba changed the title fix: open conflict sync PRs and comment on the original PR [ED-25668] Fix: Open conflict sync PRs and comment on the original PR [ED-25668] Sep 28, 2026
@Ntnelbaba Ntnelbaba changed the title Fix: Open conflict sync PRs and comment on the original PR [ED-25668] Fix: Open conflict sync PRs and comment [ED-25668] Sep 28, 2026
@Ntnelbaba
Ntnelbaba enabled auto-merge (squash) September 28, 2026 08:32
@davseve davseve changed the title Fix: Open conflict sync PRs and comment [ED-25668] fix: open conflict sync PRs and comment [ED-25668] Sep 28, 2026
@davseve
davseve disabled auto-merge September 28, 2026 10:22
@davseve
davseve merged commit ce47fa9 into main Sep 28, 2026
19 of 25 checks passed
@davseve
davseve deleted the fix/sync-conflict-prs branch September 28, 2026 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants