Use SmartBaseRepoFunc for api command (#7594)
This commit is contained in:
parent
8a7d80864b
commit
a7e2fc49b0
1 changed files with 7 additions and 7 deletions
|
|
@ -133,13 +133,6 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) (*cobra.Command,
|
|||
cmd.AddCommand(sshKeyCmd.NewCmdSSHKey(f))
|
||||
cmd.AddCommand(statusCmd.NewCmdStatus(f, nil))
|
||||
cmd.AddCommand(newCodespaceCmd(f))
|
||||
|
||||
// the `api` command should not inherit any extra HTTP headers
|
||||
bareHTTPCmdFactory := *f
|
||||
bareHTTPCmdFactory.HttpClient = bareHTTPClient(f, version)
|
||||
|
||||
cmd.AddCommand(apiCmd.NewCmdApi(&bareHTTPCmdFactory, nil))
|
||||
|
||||
cmd.AddCommand(projectCmd.NewCmdProject(f))
|
||||
|
||||
// below here at the commands that require the "intelligent" BaseRepo resolver
|
||||
|
|
@ -156,6 +149,13 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) (*cobra.Command,
|
|||
cmd.AddCommand(workflowCmd.NewCmdWorkflow(&repoResolvingCmdFactory))
|
||||
cmd.AddCommand(labelCmd.NewCmdLabel(&repoResolvingCmdFactory))
|
||||
|
||||
// the `api` command should not inherit any extra HTTP headers
|
||||
bareHTTPCmdFactory := *f
|
||||
bareHTTPCmdFactory.HttpClient = bareHTTPClient(f, version)
|
||||
bareHTTPCmdFactory.BaseRepo = factory.SmartBaseRepoFunc(&bareHTTPCmdFactory)
|
||||
|
||||
cmd.AddCommand(apiCmd.NewCmdApi(&bareHTTPCmdFactory, nil))
|
||||
|
||||
// Help topics
|
||||
var referenceCmd *cobra.Command
|
||||
for _, ht := range HelpTopics {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue