Skip to content

Prefer main when auto-merging into staging#1371

Merged
validbeck merged 1 commit into
mainfrom
fix/staging-prefer-main-on-conflicts
Jun 19, 2026
Merged

Prefer main when auto-merging into staging#1371
validbeck merged 1 commit into
mainfrom
fix/staging-prefer-main-on-conflicts

Conversation

@validbeck

Copy link
Copy Markdown
Collaborator

Summary

Updates the Merge main into staging workflow so conflicts resolve in favor of main instead of failing and leaving staging stuck.

  • Uses git merge -X theirs (on staging, theirs = main)
  • Falls back to git checkout --theirs for any paths Git still marks unmerged

Test plan

  • Merge this PR to main
  • Merge PR #1370 to unblock current staging
  • Push a follow-up commit to main and confirm Merge main into staging succeeds without manual intervention

Made with Cursor

Use merge -X theirs so rename and content conflicts no longer block the staging sync chain.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown
Contributor

Pull requests must include at least one of the required labels: internal, highlight, enhancement, bug, deprecation, documentation. Except for internal, pull requests must also include a description in the release notes section.

@github-actions

Copy link
Copy Markdown
Contributor

PR Summary

This PR updates the GitHub Actions workflow responsible for merging changes from the main branch into staging. The merge step now uses a strategy that favors the main branch by running a merge with the '-X theirs' option. In case of merge conflicts, the script automatically resolves them by checking out the main branch's versions for the affected files, adding them, and committing the merge. This ensures that in the event of a conflict, the main branch's changes take precedence without manual intervention.

Test Suggestions

  • Test the merge action by simulating a merge with conflicts to ensure that the conflict resolution correctly defaults to the main branch's version.
  • Verify that the workflow logs appropriately show the warning message when conflicts are encountered.
  • Ensure that the commit after conflict resolution contains the correct changes and that no unintended changes are applied.

@validbeck validbeck added the internal Not to be externalized in the release notes label Jun 18, 2026
@validbeck validbeck self-assigned this Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Validate docs site

✓ INFO: A live preview of the docs site is available — Open the preview

@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse check results

✓ INFO: No site pages to audit in this PR.

Commit SHA: 4d4609d

@validbeck validbeck merged commit fa00a47 into main Jun 19, 2026
7 of 8 checks passed
@validbeck validbeck deleted the fix/staging-prefer-main-on-conflicts branch June 19, 2026 00:17
@validbeck validbeck mentioned this pull request Jun 19, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant