Skip to content

feat(MORG-26): rework sync flow — always pull, PR sync before deletion, --all flag - #18

Merged
developerdavi merged 2 commits into
mainfrom
morg-26
Mar 5, 2026
Merged

developerdavi merged 2 commits into
mainfrom
morg-26

Conversation

@developerdavi

Copy link
Copy Markdown
Owner

Closes MORG-26

New sync flow

  1. Pull default branch — always, no prompt
  2. Sync PR statuses — all tracked branches
  3. Delete merged branches — all tracked branches (respects autoDeleteMerged config); if the current branch is merged, switches to the default branch first
  4. Update with incoming changes — current branch only by default; --all flag extends this to all active branches

Key changes

  • Removed the syncPull prompt — pull always runs
  • PR status sync moved before deletion so merged branches are identified and cleaned up before the update step
  • Added --all flag: morg sync --all to rebase/merge all active branches instead of just the current one
  • Deleted branches are never offered for update since deletion runs first

…n, --all flag

New order: pull default branch (always, no prompt) → sync PR statuses
for all branches → delete merged branches → offer rebase/merge for
current branch only (or all branches with --all).

Merged branches are now cleaned up before the update step, so you
never get prompted to update a branch that's about to be deleted.
If the current branch is merged it is deleted and the working tree
switches to the default branch before continuing.
syncPull was only consumed by morg sync, which now always pulls the
default branch unconditionally. Remove the field from GlobalConfig,
ProjectConfig, morg config prompts/display, and morg init.
@developerdavi
developerdavi merged commit 88283a5 into main Mar 5, 2026
1 check passed
@developerdavi
developerdavi deleted the morg-26 branch March 5, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant