works
This commit is contained in:
parent
1b4abd67a9
commit
7725116428
2 changed files with 6 additions and 4 deletions
|
|
@ -1,2 +0,0 @@
|
|||
package rename
|
||||
|
||||
|
|
@ -94,17 +94,21 @@ func renameRun(opts *RenameOptions) error {
|
|||
return err
|
||||
}
|
||||
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func runRename(apiClient *api.Client, hostname string, repoDetails *api.Repository, input renameRepo) error {
|
||||
path := fmt.Sprintf("repos/%s/%s", repoDetails.Owner.Login, repoDetails.Name)
|
||||
|
||||
body := &bytes.Buffer{}
|
||||
enc := json.NewEncoder(body)
|
||||
if err := enc.Encode(input); err != nil {
|
||||
return err
|
||||
}
|
||||
path := fmt.Sprintf("repos/%s/%s", repoDetails.Owner.Login, repoDetails.Name)
|
||||
err := apiClient.REST(hostname, "PATCH", path, nil, body)
|
||||
|
||||
err := apiClient.REST(hostname, "PATCH", path, body, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue