github.com/ungtb10d/cli/v2@v2.0.0-20221110210412-98537dd9d6a1/pkg/cmd/secret/secret.go (about)

     1  package secret
     2  
     3  import (
     4  	"github.com/MakeNowJust/heredoc"
     5  	cmdDelete "github.com/ungtb10d/cli/v2/pkg/cmd/secret/delete"
     6  	cmdList "github.com/ungtb10d/cli/v2/pkg/cmd/secret/list"
     7  	cmdSet "github.com/ungtb10d/cli/v2/pkg/cmd/secret/set"
     8  	"github.com/ungtb10d/cli/v2/pkg/cmdutil"
     9  	"github.com/spf13/cobra"
    10  )
    11  
    12  func 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, or organization level for use in
    18  			GitHub Actions or Dependabot. User, organization, and repository secrets can be set for
    19  			use in GitHub Codespaces. Environment secrets can be set for use in
    20  			GitHub Actions. Run "gh help secret set" to learn how to get started.
    21  `),
    22  	}
    23  
    24  	cmdutil.EnableRepoOverride(cmd, f)
    25  
    26  	cmd.AddCommand(cmdList.NewCmdList(f, nil))
    27  	cmd.AddCommand(cmdSet.NewCmdSet(f, nil))
    28  	cmd.AddCommand(cmdDelete.NewCmdDelete(f, nil))
    29  
    30  	return cmd
    31  }