cli/pkg/cmd/variable/variable.go
2023-03-13 03:21:21 +00:00

26 lines
719 B
Go

package variable
import (
"github.com/MakeNowJust/heredoc"
cmdList "github.com/cli/cli/v2/pkg/cmd/variable/list"
cmdSet "github.com/cli/cli/v2/pkg/cmd/variable/set"
"github.com/cli/cli/v2/pkg/cmdutil"
"github.com/spf13/cobra"
)
func NewCmdVariable(f *cmdutil.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "variable <command>",
Short: "Manage GitHub Actions variables",
Long: heredoc.Doc(`
Variables can be set at the repository, environment or organization level for use in GitHub Actions.
Run "gh help variable set" to learn how to get started.
`),
}
cmdutil.EnableRepoOverride(cmd, f)
cmd.AddCommand(cmdSet.NewCmdSet(f, nil))
cmd.AddCommand(cmdList.NewCmdList(f, nil))
return cmd
}