Merge branch 'pr-commands-isolate-2' into pr-commands-isolate-3

This commit is contained in:
Mislav Marohnić 2020-08-11 15:30:09 +02:00
commit fcaf912961
20 changed files with 1389 additions and 49 deletions

View file

@ -194,7 +194,7 @@ func aliasList(cmd *cobra.Command, args []string) error {
var aliasDeleteCmd = &cobra.Command{
Use: "delete <alias>",
Short: "Delete an alias.",
Short: "Delete an alias",
Args: cobra.ExactArgs(1),
RunE: aliasDelete,
}

View file

@ -22,6 +22,9 @@ import (
"github.com/cli/cli/internal/ghrepo"
"github.com/cli/cli/internal/run"
apiCmd "github.com/cli/cli/pkg/cmd/api"
authCmd "github.com/cli/cli/pkg/cmd/auth"
authLoginCmd "github.com/cli/cli/pkg/cmd/auth/login"
authLogoutCmd "github.com/cli/cli/pkg/cmd/auth/logout"
gistCreateCmd "github.com/cli/cli/pkg/cmd/gist/create"
prCmd "github.com/cli/cli/pkg/cmd/pr"
repoCmd "github.com/cli/cli/pkg/cmd/repo"
@ -132,6 +135,10 @@ func init() {
RootCmd.AddCommand(gistCmd)
gistCmd.AddCommand(gistCreateCmd.NewCmdCreate(cmdFactory, nil))
RootCmd.AddCommand(authCmd.Cmd)
authCmd.Cmd.AddCommand(authLoginCmd.NewCmdLogin(cmdFactory, nil))
authCmd.Cmd.AddCommand(authLogoutCmd.NewCmdLogout(cmdFactory, nil))
resolvedBaseRepo := func() (ghrepo.Interface, error) {
httpClient, err := cmdFactory.HttpClient()
if err != nil {