(f *cmdutil.Factory, telemetry ghtelemetry.InvocationRecorder)
| 15 | ) |
| 16 | |
| 17 | func NewCmdAuth(f *cmdutil.Factory, telemetry ghtelemetry.InvocationRecorder) *cobra.Command { |
| 18 | cmd := &cobra.Command{ |
| 19 | Use: "auth <command>", |
| 20 | Short: "Authenticate gh and git with GitHub", |
| 21 | GroupID: "core", |
| 22 | } |
| 23 | |
| 24 | cmdutil.DisableAuthCheck(cmd) |
| 25 | |
| 26 | loginCmd := authLoginCmd.NewCmdLogin(f, telemetry, nil) |
| 27 | refreshCmd := authRefreshCmd.NewCmdRefresh(f, telemetry, nil) |
| 28 | |
| 29 | cmd.AddCommand(loginCmd) |
| 30 | cmd.AddCommand(authLogoutCmd.NewCmdLogout(f, nil)) |
| 31 | cmd.AddCommand(authStatusCmd.NewCmdStatus(f, nil)) |
| 32 | cmd.AddCommand(refreshCmd) |
| 33 | cmd.AddCommand(gitCredentialCmd.NewCmdCredential(f, nil)) |
| 34 | cmd.AddCommand(authSetupGitCmd.NewCmdSetupGit(f, nil)) |
| 35 | cmd.AddCommand(authTokenCmd.NewCmdToken(f, nil)) |
| 36 | cmd.AddCommand(authSwitchCmd.NewCmdSwitch(f, nil)) |
| 37 | |
| 38 | cmdutil.DisableTelemetryForSubcommands(cmd) |
| 39 | |
| 40 | return cmd |
| 41 | } |
nothing calls this directly
no test coverage detected