fix(ci): fetch upstream objects so plus branch sync works
Merged
RI
3mo ago+47+47+01234567890123456789-10-10-01234567890123456789
What
- Fix
sync-branches.ymlso merges withionic-team/capacitorwork underactions/checkoutpartial clones (filter: blob:none). - Harden merge failure handling so the workflow can open conflict PRs instead of exiting 128.
- Make
needs-reply.ymla no-op success when GitHub issues are disabled on this repo.
Why
The scheduled sync-plus-branch job has failed daily since partial-clone checkout was introduced. Latest failure: actions run 32334591459.
Root cause (verified in logs):
actions/checkout@v6withfilter: blob:nonemakesorigin(Cap-go/capacitor-plus) the promisor remote.- The job fetches
upstream/mainbut does not registerupstreamas a promisor remote. git merge upstream/mainlazy-fetches missing blobs fromorigin, which does not have Ionic objects →upload-pack: not our ref/could not fetch … from promisor remote.- Merge never starts (
MERGE_HEADmissing), but the step prints "Merge conflict detected" for any non-zero merge exit. git merge --abortthen fails with exit 128 underbash -e, somerge_success=falseis never written and the "Create PR for conflicts" step is skipped.
sync-main-branch currently succeeds only because there are no pending upstream commits; it uses the same pattern and would hit the same bug once upstream moves ahead.
How
sync-branches.yml (both sync-main-branch and sync-plus-branch)
- After adding
upstream, configure it as a promisor remote with the same blob filter as checkout. - Run
git fetch --no-filter upstream mainto prefetch merge objects from Ionic before merging. - On merge failure: distinguish conflict vs pre-merge failure in logs, use
git merge --abort || true, and always writemerge_success=falseso conflict PR creation can run.
needs-reply.yml
- Query
repos/{owner}/{repo}.has_issuesviagh api. - Skip the
imhoffd/needs-replyaction when issues are disabled (currentlyfalseon Cap-go/capacitor-plus). The scheduled job exits green instead of failing on missing/disabled issue APIs.
Testing
- Reproduced the CI failure signature from run 32334591459 logs.
- Locally simulated partial clones (
filter:blob:none+ origin promisor) and confirmed merge reaches normal conflict resolution with upstream promisor config +--no-filterfetch (no promisor fatal). - Confirmed
plusis 30 commits behindionic-team/capacitormain(merge-baseb3c769e8).
Not Tested
- Full GitHub Actions run after merge (please re-run Sync Branches from Upstream →
plusviaworkflow_dispatchonce this PR is merged).
plus catch-up (follow-up — not in this PR)
A local merge of upstream/main into plus is not clean: conflicts in Capgo overlays and upstream churn, including:
.github/workflows/ci.yml(deleted on plus, modified upstream)CHANGELOG.mdfiles andlerna.json/ package versionsandroid/.../SystemBars.java,SystemBarsTest.java,BridgeWebChromeClient.javaandroid|cli|core|ios/package.json
This PR fixes the automation only. After merge, the workflow should either push a clean merge or open a conflict-resolution PR.
Existing open sync PRs left untouched:
How to verify after merge
- Actions → Sync Branches from Upstream → Run workflow → branch:
plus. - Expect
sync-plus-branchto pass or open/update a conflict sync PR (not exit 128 on promisor errors). - Confirm
needs-reply.ymlscheduled run succeeds with "Issues are disabled … skipping".


Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by CodeRabbit
- Bug Fixes
- Improved workflow behavior when issue tracking is disabled by skipping unnecessary issue-processing steps.
- Enhanced branch synchronization reliability, including safer handling of fetches, merge conflicts, and merge cleanup.