forked from cli/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkflow.go
More file actions
31 lines (27 loc) · 933 Bytes
/
workflow.go
File metadata and controls
31 lines (27 loc) · 933 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package workflow
import (
cmdDisable "github.com/cli/cli/pkg/cmd/workflow/disable"
cmdEnable "github.com/cli/cli/pkg/cmd/workflow/enable"
cmdList "github.com/cli/cli/pkg/cmd/workflow/list"
cmdRun "github.com/cli/cli/pkg/cmd/workflow/run"
cmdView "github.com/cli/cli/pkg/cmd/workflow/view"
"github.com/cli/cli/pkg/cmdutil"
"github.com/spf13/cobra"
)
func NewCmdWorkflow(f *cmdutil.Factory) *cobra.Command {
cmd := &cobra.Command{
Use: "workflow <command>",
Short: "View details about GitHub Actions workflows",
Long: "List, view, and run workflows in GitHub Actions.",
Annotations: map[string]string{
"IsActions": "true",
},
}
cmdutil.EnableRepoOverride(cmd, f)
cmd.AddCommand(cmdList.NewCmdList(f, nil))
cmd.AddCommand(cmdEnable.NewCmdEnable(f, nil))
cmd.AddCommand(cmdDisable.NewCmdDisable(f, nil))
cmd.AddCommand(cmdView.NewCmdView(f, nil))
cmd.AddCommand(cmdRun.NewCmdRun(f, nil))
return cmd
}