Address review comments
This commit is contained in:
parent
81eeaca959
commit
cdc7cae29c
3 changed files with 8 additions and 5 deletions
|
|
@ -217,7 +217,7 @@ func cloneRun(opts *CloneOptions) error {
|
|||
connectedToTerminal := opts.IO.IsStdoutTTY()
|
||||
if connectedToTerminal {
|
||||
cs := opts.IO.ColorScheme()
|
||||
fmt.Fprintf(opts.IO.ErrOut, "%s Repository %s set as the default repository. To learn more about the default repository, run: gh repo set-default --help\n", cs.WarningIcon(), cs.Bold(ghrepo.FullName(canonicalRepo.Parent)))
|
||||
fmt.Fprintf(opts.IO.Out, "%s Repository %s set as the default repository. To learn more about the default repository, run: gh repo set-default --help\n", cs.WarningIcon(), cs.Bold(ghrepo.FullName(canonicalRepo.Parent)))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -378,8 +378,8 @@ func forkRun(opts *ForkOptions) error {
|
|||
}
|
||||
|
||||
if connectedToTerminal {
|
||||
fmt.Fprintf(stderr, "%s Cloned fork\n", cs.SuccessIcon())
|
||||
fmt.Fprintf(stderr, "%s Repository %s set as the default repository. To learn more about the default repository, run: gh repo set-default --help\n", cs.WarningIcon(), cs.Bold(ghrepo.FullName(repoToFork)))
|
||||
fmt.Fprintf(opts.IO.Out, "%s Cloned fork\n", cs.SuccessIcon())
|
||||
fmt.Fprintf(opts.IO.Out, "%s Repository %s set as the default repository. To learn more about the default repository, run: gh repo set-default --help\n", cs.WarningIcon(), cs.Bold(ghrepo.FullName(repoToFork)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,15 +119,18 @@ func setDefaultRun(opts *SetDefaultOptions) error {
|
|||
|
||||
currentDefaultRepo, _ := remotes.ResolvedRemote()
|
||||
|
||||
cs := opts.IO.ColorScheme()
|
||||
|
||||
if opts.ViewMode {
|
||||
if currentDefaultRepo != nil {
|
||||
fmt.Fprintln(opts.IO.Out, displayRemoteRepoName(currentDefaultRepo))
|
||||
} else {
|
||||
fmt.Fprintln(opts.IO.ErrOut, "no default repository has been set; use `gh repo set-default` to select one")
|
||||
fmt.Fprintf(opts.IO.ErrOut,
|
||||
"%s No default remote repository has been set. To learn more about the default repository, run: gh repo set-default --help\n",
|
||||
cs.FailureIcon())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
cs := opts.IO.ColorScheme()
|
||||
|
||||
if opts.UnsetMode {
|
||||
var msg string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue