1package secret 2 3import ( 4 "github.com/MakeNowJust/heredoc" 5 cmdList "github.com/cli/cli/v2/pkg/cmd/secret/list" 6 cmdRemove "github.com/cli/cli/v2/pkg/cmd/secret/remove" 7 cmdSet "github.com/cli/cli/v2/pkg/cmd/secret/set" 8 "github.com/cli/cli/v2/pkg/cmdutil" 9 "github.com/spf13/cobra" 10) 11 12func NewCmdSecret(f *cmdutil.Factory) *cobra.Command { 13 cmd := &cobra.Command{ 14 Use: "secret <command>", 15 Short: "Manage GitHub secrets", 16 Long: heredoc.Doc(` 17 Secrets can be set at the repository, environment, or organization level for use in 18 GitHub Actions. User secrets can be set for use in GitHub Codespaces. 19 Run "gh help secret set" to learn how to get started. 20`), 21 } 22 23 cmdutil.EnableRepoOverride(cmd, f) 24 25 cmd.AddCommand(cmdList.NewCmdList(f, nil)) 26 cmd.AddCommand(cmdSet.NewCmdSet(f, nil)) 27 cmd.AddCommand(cmdRemove.NewCmdRemove(f, nil)) 28 29 return cmd 30} 31