Properly rename remote for GHES hosts (#7890)

This commit is contained in:
Sam Coe 2023-08-25 10:01:26 -07:00 committed by GitHub
parent 508065b72d
commit 6f618b522c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -124,8 +124,6 @@ func renameRun(opts *RenameOptions) error {
return err
}
renamedRepo := ghrepo.New(newRepo.Owner.Login, newRepo.Name)
cs := opts.IO.ColorScheme()
if opts.IO.IsStdoutTTY() {
fmt.Fprintf(opts.IO.Out, "%s Renamed repository %s\n", cs.SuccessIcon(), ghrepo.FullName(newRepo))
@ -135,7 +133,7 @@ func renameRun(opts *RenameOptions) error {
return nil
}
remote, err := updateRemote(currRepo, renamedRepo, opts)
remote, err := updateRemote(currRepo, newRepo, opts)
if err != nil {
fmt.Fprintf(opts.IO.ErrOut, "%s Warning: unable to update remote %q: %v\n", cs.WarningIcon(), remote.Name, err)
} else if opts.IO.IsStdoutTTY() {