Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(import), prompt available paths from imported components to dependents #8505

Merged
merged 9 commits into from
Feb 7, 2024

Conversation

davidfirst
Copy link
Member

@davidfirst davidfirst commented Feb 7, 2024

The flag --dependents of bit import brings all the components linked from the workspace components to the specified component (target). In many cases it's not needed and the user is interested in a specific path from the workspace to the component.
This PR makes the following changes:

  • if it found 10 paths or less, it shows a multi-select prompt with available paths.
  • if it found more than 10 paths, it prompts the first level only (workspace-components) and once selected, it shows the next level only until it reaches the specified component (target).
  • once the paths are selected by the user, it shows a prompt with the components that should be imported for the selected paths. The user can confirm or abort.
  • the --dependents-dry-run is deprecated. Now it's the default. It always asks for confirmation before bringing in the dependents.
  • the --dependents-through flag is renamed to --dependents-via.
  • a new flag --silent is introduced to avoid all prompts of --dependents and --dependents-via

Example with less than 10 paths:
Screenshot 2024-02-07 at 9 56 57 AM

Example with more than 10 paths:
Screenshot 2024-02-07 at 9 46 54 AM

@davidfirst davidfirst merged commit 41f08e6 into master Feb 7, 2024
11 checks passed
@davidfirst davidfirst deleted the import-dependents-prompts-paths branch February 7, 2024 15:55
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.

None yet

2 participants