Conversation
The directory path for cloned snippets no longer includes the author prefix, simplifying the structure and making it more consistent with user expectations. This change also updates the corresponding test cases to reflect the new directory naming convention.
Contributor
|
@imrishabh18 so I actually like this feature where we keep the author name in the package, github doesn't do it and that's our reference so maybe it's ok to disable it by default, but for my selfish self we should make it a config setting that i can turn on 😁 the reason i like it is because the directory structure you create resembles the registry, i'm sure it would be really annoying for teams where everything in the directory has |
This commit introduces a new `--include-author` flag to the clone command, which includes the author's name in the directory path when cloning a snippet. This change helps avoid naming conflicts and improves project organization by clearly distinguishing projects by their authors.
seveibar
requested changes
Apr 23, 2025
Contributor
seveibar
left a comment
There was a problem hiding this comment.
the flag is OK but can you make it a user setting as well?
also note, -ia is not a best-practice flag since in many CLIs it means -i and -a, i would maybe use --include-author / -a
The `-ia, --include-author` flag was simplified to `-a, --include-author` for better usability. Additionally, a new test was added to verify the functionality of the `-a` flag.
Introduce a new configuration option `alwaysCloneWithAuthorName` to control whether the author name is included in the cloned snippet directory by default. This allows users to set a global preference for including the author name, reducing the need to specify the `--include-author` flag repeatedly. Additionally, improve error handling for the clone command by providing a more user-friendly message when a snippet is not found. Register a new `config set` command to allow users to modify configuration values programmatically.
tsci config set && refactor(clone): improve error message, author name customization
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.
The directory path for cloned snippets no longer includes the author prefix, simplifying the structure and making it more consistent with user expectations. This change also updates the corresponding test cases to reflect the new directory naming convention.
Introduce a new configuration option
alwaysCloneWithAuthorNameto control whether the author name is included in the cloned snippet directory by default. This allows users to set a global preference for including the author name, reducing the need to specify the--include-authorflag repeatedly.Additionally, improve error handling for the clone command by providing a more user-friendly message when a snippet is not found. Register a new
config setcommand to allow users to modify configuration values programmatically./claim #182