-
Couldn't load subscription status.
- Fork 7.3k
shorthand of clone without username #861
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
Conversation
|
I'm into this. what do you think @ampinsk ? |
|
this makes sense to me! ✨ |
command/repo.go
Outdated
| if !strings.Contains(cloneURL, ":") { | ||
| if !strings.Contains(cloneURL, "/") { | ||
| ctx := contextForCommand(cmd) | ||
| currentUsername, err := ctx.AuthLogin() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer provide AuthLogin from config: 767521c
Please request CurrentLoginName() in this case. It will result in an additional API request, which you will have to stub in tests for this case. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed this here. Please take a look, thank you!
Signed-off-by: Joe Hattori <[email protected]>
Signed-off-by: Joe Hattori <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great; thank you!
Could you also amend the repo clone command documentation (at the top of the same file) to indicate that this functionality is available?
Resolves: #860
Enable the shorthand of cloning private repository by omitting username.