feat: add pattern support to bit fork command#10094
Merged
davidfirst merged 7 commits intomasterfrom Nov 26, 2025
Merged
Conversation
- Updated fork command to accept patterns for forking multiple components - Pattern mode forks all matching components with same names to target scope - Added validation to prevent target-component-name when using patterns - Target scope required via --scope flag or workspace defaultScope - Supports both workspace and remote component patterns - Added e2e tests for pattern forking functionality
targetScope will be handled naturally by downstream code
- Extract scope names from pattern to query remote scopes - Support comma-separated patterns across multiple scopes - Works with empty workspace forking remote components - Uses filterIdsFromPoolIdsByPattern for consistent pattern matching
- Filter out components that already exist with target scope - Fork remaining components without error - Only error if ALL components already exist - More user-friendly when re-running fork command
- Detect patterns using wildcards or commas - Add forkByPattern method to handle multiple component forking - Support cross-scope pattern matching for remote components - Filter out already-forked components to avoid conflicts - Add e2e tests for pattern-based forking scenarios
GiladShoham
approved these changes
Nov 25, 2025
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.
Support patterns in
bit forkcommand.Changes
bit forkcommand usinghasWildcard()target-component-namewhen using patterns--scopeflag or workspacedefaultScopeforkByPattern()method inForkingMainUsage Examples
Benefits
bit forkbit scope forkremains useful as convenience command