fix(ci): resolve modify/delete conflicts in sync conflict PRs - #110
Conversation
- Add merge_upstream_preferred helper for -X theirs plus modify/delete
- Refetch upstream objects before merge to reduce promisor lazy-fetch errors
- Checkout conflict PR branches from origin/{main,plus}
Co-authored-by: Martin DONADIEU <martindonadieu@gmail.com>
Beta npm buildMaintainers can publish one Capacitor Plus workspace package from this PR to npm for fast testing. Comment Examples: /publish-beta core
/publish-beta cli
/publish-beta @capacitor-plus/coreIf exactly one workspace package changed, Packages:
The workflow will:
Security note: beta publish is only enabled for branches inside this repository. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change adds shared upstream-preferred merge handling and updates both branch-sync jobs to refetch upstream objects, use origin-based conflict branches, and apply consistent failure cleanup. ChangesUpstream synchronization
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant SyncWorkflow
participant merge_upstream_preferred
participant GitRepository
SyncWorkflow->>merge_upstream_preferred: request upstream merge
merge_upstream_preferred->>GitRepository: merge with theirs preference
merge_upstream_preferred->>GitRepository: select or delete upstream files
merge_upstream_preferred->>GitRepository: verify conflicts and commit merge
sequenceDiagram
participant SyncWorkflow
participant UpstreamRemote
participant GitRepository
SyncWorkflow->>UpstreamRemote: refetch upstream objects
SyncWorkflow->>GitRepository: create conflict branch from origin/main or origin/plus
SyncWorkflow->>GitRepository: invoke merge_upstream_preferred
GitRepository-->>SyncWorkflow: merged or unresolved result
SyncWorkflow->>GitRepository: abort merge or reset to origin reference on failure
✨ Finishing Touches📝 Generate docstrings
Comment |
What
Create PR for conflictsinsync-branches.ymlwhen upstream sync hits modify/delete conflicts (e.g..github/workflows/ci.ymldeleted onplus, modified upstream).Why
Run 32394290222 shows PR #109 fixed the promisor crash and correctly detected merge conflicts, but the job still failed at Create PR for conflicts:
git merge upstream/main -X theirsauto-resolved content conflicts.github/workflows/ci.ymlstayed unmergedHow
merge_upstream_preferred()in.github/scripts/sync-gh-helpers.sh: runs-X theirs, then for remaining unmerged paths runsgit checkout --theirs+git add(covers modify/delete), then commits.sync-main-branchandsync-plus-branchconflict PR steps use the helper.git fetch --refetch --no-filter upstream mainafter initial upstream fetch.origin/plus/origin/main.Testing
ci.yml.Not Tested
plus).Notes
.github/workflows/ci.yml; review before merging sync PR.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit