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

     1  package run
     2  
     3  import (
     4  	cmdCancel "github.com/ungtb10d/cli/v2/pkg/cmd/run/cancel"
     5  	cmdDownload "github.com/ungtb10d/cli/v2/pkg/cmd/run/download"
     6  	cmdList "github.com/ungtb10d/cli/v2/pkg/cmd/run/list"
     7  	cmdRerun "github.com/ungtb10d/cli/v2/pkg/cmd/run/rerun"
     8  	cmdView "github.com/ungtb10d/cli/v2/pkg/cmd/run/view"
     9  	cmdWatch "github.com/ungtb10d/cli/v2/pkg/cmd/run/watch"
    10  	"github.com/ungtb10d/cli/v2/pkg/cmdutil"
    11  	"github.com/spf13/cobra"
    12  )
    13  
    14  func NewCmdRun(f *cmdutil.Factory) *cobra.Command {
    15  	cmd := &cobra.Command{
    16  		Use:   "run <command>",
    17  		Short: "View details about workflow runs",
    18  		Long:  "List, view, and watch recent workflow runs from GitHub Actions.",
    19  		Annotations: map[string]string{
    20  			"IsActions": "true",
    21  		},
    22  	}
    23  	cmdutil.EnableRepoOverride(cmd, f)
    24  
    25  	cmd.AddCommand(cmdList.NewCmdList(f, nil))
    26  	cmd.AddCommand(cmdView.NewCmdView(f, nil))
    27  	cmd.AddCommand(cmdRerun.NewCmdRerun(f, nil))
    28  	cmd.AddCommand(cmdDownload.NewCmdDownload(f, nil))
    29  	cmd.AddCommand(cmdWatch.NewCmdWatch(f, nil))
    30  	cmd.AddCommand(cmdCancel.NewCmdCancel(f, nil))
    31  
    32  	return cmd
    33  }