github.com/abdfnx/gh-api@v0.0.0-20210414084727-f5432eec23b8/pkg/cmd/run/run.go (about)

     1  package run
     2  
     3  import (
     4  	cmdDownload "github.com/abdfnx/gh-api/pkg/cmd/run/download"
     5  	cmdList "github.com/abdfnx/gh-api/pkg/cmd/run/list"
     6  	cmdRerun "github.com/abdfnx/gh-api/pkg/cmd/run/rerun"
     7  	cmdView "github.com/abdfnx/gh-api/pkg/cmd/run/view"
     8  	cmdWatch "github.com/abdfnx/gh-api/pkg/cmd/run/watch"
     9  	"github.com/abdfnx/gh-api/pkg/cmdutil"
    10  	"github.com/spf13/cobra"
    11  )
    12  
    13  func NewCmdRun(f *cmdutil.Factory) *cobra.Command {
    14  	cmd := &cobra.Command{
    15  		Use:    "run <command>",
    16  		Short:  "View details about workflow runs",
    17  		Long:   "List, view, and watch recent workflow runs from GitHub Actions.",
    18  		Hidden: true,
    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  
    31  	return cmd
    32  }