Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@joehattori
Copy link
Contributor

Resolves: #860
Enable the shorthand of cloning private repository by omitting username.

@mislav mislav changed the base branch from master to trunk May 27, 2020 11:41
@vilmibm
Copy link
Contributor

vilmibm commented Jun 1, 2020

I'm into this. what do you think @ampinsk ?

@ampinsk
Copy link
Contributor

ampinsk commented Jun 1, 2020

this makes sense to me! ✨

command/repo.go Outdated
if !strings.Contains(cloneURL, ":") {
if !strings.Contains(cloneURL, "/") {
ctx := contextForCommand(cmd)
currentUsername, err := ctx.AuthLogin()
Copy link
Contributor

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!

Copy link
Contributor Author

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]>
@joehattori joehattori requested a review from mislav June 3, 2020 14:05
Copy link
Contributor

@mislav mislav left a 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?

@joehattori
Copy link
Contributor Author

@mislav Done! Is this the right place to amend?

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.

Shorthand for cloning personal repositories

4 participants