optimize api calls
This commit is contained in:
parent
ddd0b7cb04
commit
8400ed4a19
1 changed files with 4 additions and 5 deletions
|
|
@ -123,12 +123,11 @@ func renameRun(opts *RenameOptions) error {
|
|||
oldRepoURL := opts.oldRepoSelector
|
||||
newRepoName := opts.newRepoSelector
|
||||
|
||||
currentUser, err := api.CurrentLoginName(apiClient, ghinstance.Default())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !strings.Contains(oldRepoURL, "/") {
|
||||
currentUser, err := api.CurrentLoginName(apiClient, ghinstance.Default())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
oldRepoURL = currentUser + "/" + oldRepoURL
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue