* Implement first round of support for GitHub Actions This commit adds: gh actions gh run list gh run view gh job view as part of our first round of actions support. These commands are unlisted and considered in beta. * review feedback * tests for exit status on job view * spinner tracks io itself * review feedback * fix PR matching * enable pager for job log viewing * add more colorf functions * add AnnotationSymbol * hide job, run * do not add method to api.Client * remove useless cargo coded copypasta
25 lines
692 B
Go
25 lines
692 B
Go
package run
|
|
|
|
import (
|
|
cmdList "github.com/cli/cli/pkg/cmd/run/list"
|
|
cmdView "github.com/cli/cli/pkg/cmd/run/view"
|
|
"github.com/cli/cli/pkg/cmdutil"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func NewCmdRun(f *cmdutil.Factory) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "run <command>",
|
|
Short: "View details about workflow runs",
|
|
Hidden: true,
|
|
Long: "List, view, and watch recent workflow runs from GitHub Actions.",
|
|
// TODO i'd like to have all the actions commands sorted into their own zone which i think will
|
|
// require a new annotation
|
|
}
|
|
cmdutil.EnableRepoOverride(cmd, f)
|
|
|
|
cmd.AddCommand(cmdList.NewCmdList(f, nil))
|
|
cmd.AddCommand(cmdView.NewCmdView(f, nil))
|
|
|
|
return cmd
|
|
}
|