Conversation
…h meeds to be passed. 2. Interactive repo create when no parameters are passed, i.e `repo create`. 3. Fix tests. TODO : write a repo in the form of user/repository format when no user is supplied.
Contributor
Author
|
Requesting to have a look at this 🙏 |
ampinsk
suggested changes
Aug 17, 2020
ampinsk
left a comment
There was a problem hiding this comment.
Hi, thanks so much for this and apologies for the delay. I reviewed quickly from an experience perspective and had a couple of comments. I'll leave a more thorough review to @mislav or @vilmibm. thanks again!
- In this prompt, can the options be in sentence case instead of capitalized?
? Visibility [Use arrows to move, type to filter]
> PUBLIC
PRIVATE
INTERNAL
Should be
? Visibility [Use arrows to move, type to filter]
> Public
Private
Internal
- In the final confirmation, the default choice should be
yes, notno, and the repository name should have single quotes around it.
This will create name in your current directory. Continue? (y/N) should be This will create 'name' in your current directory. Continue? (Y/n)
This comment was marked as spam.
This comment was marked as spam.
vilmibm
suggested changes
Aug 19, 2020
Contributor
vilmibm
left a comment
There was a problem hiding this comment.
This is looking good, thank you! Just one minor change, please.
pkg/cmd/repo/create/create.go
Outdated
| Name: "repoVisibility", | ||
| Prompt: &survey.Select{ | ||
| Message: "Visibility", | ||
| Options: []string{"PUBLIC", "PRIVATE", "INTERNAL"}, |
Contributor
There was a problem hiding this comment.
should also become Public, Private, Internal
The problem was that opts.confirmSubmit was mutated before reaching doSetup. This commit creates a copy of the initial confirmSubmit value. So the doSetup receives the initial data passed from the command, not the mutated one.
This comment has been minimized.
This comment has been minimized.
vilmibm
approved these changes
Aug 25, 2020
Contributor
|
Thank you for your work and patience! |
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.
Fixes #1396
Fixes #1270
Fixes #798
Ref #1330
Ref #1360
Changes:-
Introduced three new flags for visibility filters :-
--public,--private,--internalwhich need to be passed. Failure to do so invokes an interactive session.Introduces new flag
-ythat passes true for all Confirm statements.repo createhas two confirm statements :- Confirm submit? and Create local directory. Both shall be true when passed.3.
gh repo createon passing no arguments shall open up the interactive session as noted.