feat(cli): git repository support for custom init templates#820
Closed
rohang9000 wants to merge 1 commit intomainfrom
Closed
feat(cli): git repository support for custom init templates#820rohang9000 wants to merge 1 commit intomainfrom
rohang9000 wants to merge 1 commit intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #820 +/- ##
==========================================
+ Coverage 82.76% 82.88% +0.12%
==========================================
Files 71 71
Lines 10396 10519 +123
Branches 1295 1320 +25
==========================================
+ Hits 8604 8719 +115
- Misses 1753 1762 +9
+ Partials 39 38 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
iankhou
requested changes
Aug 28, 2025
| 'from-git-url': { type: 'string', desc: 'Git repository URL to clone custom template from', requiresArg: true, conflicts: ['lib-version', 'from-path'] }, | ||
| 'template-path': { type: 'string', desc: 'Path to a specific template within a multi-template repository', requiresArg: true }, | ||
| }, | ||
| implies: { 'template-path': 'from-path' }, |
Contributor
There was a problem hiding this comment.
This should be replaced by a check that ensures that from-path or from-git-url was also used.
|
|
||
| // Validate that if template-path is provided, exactly one custom template source must be provided | ||
| if (options.templatePath && !options.fromPath && !options.fromGitUrl) { | ||
| throw new ToolkitError('--template-path can only be used with --from-path or --from-git-url'); |
Contributor
There was a problem hiding this comment.
why not use a check in yargs instead? In general, try to catch problems as early as you can.
9b3ea2d to
5437650
Compare
3c79410 to
0a7ce7b
Compare
0a7ce7b to
657aaf0
Compare
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.
Rohan:
Added additional tests and implemented changes I had requested. There were 40 commits before, and many merge conflicts from #819.
Unit test coverage for
init.tsis now 97.65%. Tested by hand for many cases as well.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license