feat(sync): add --branch/-B to sync specific mapped branches#40
Merged
Conversation
Fills the gap between syncing only the current branch (no arg) and --all-branches (every branch in the upstream_branch mapping). The new repeatable --branch/-B option restricts an all-branches-style sync to the named branch(es), reusing the same rebase/force-push/restore/dry-run and downstream CI re-run flow. Names must exist in the mapping.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--branch/-Boption todbx syncthat syncs a specific subset of branches from a repo'supstream_branchmapping — filling the gap between "current branch only" (no arg) and--all-branches(everything).Changes
sync.py: New repeatable--branch/-Boption. Routes to_sync_all_brancheswith abranch_filterthat validates each name exists in the mapping (errors listing available branches otherwise), de-dupes preserving order, and reuses the same rebase/force-push/restore/dry-run/CI-rerun flow.docs/features/django-fork.rstdocuments-Bwith examples.Usage
All 40 sync tests pass; ruff clean.