@@ -21,7 +21,7 @@ func NewCmdActions(f *cmdutil.Factory) *cobra.Command {
2121 cmd := & cobra.Command {
2222 Use : "actions" ,
2323 Short : "Learn about working with GitHub actions" ,
24- Args : cobra . ExactArgs ( 0 ),
24+ Long : actionsExplainer ( nil ),
2525 Hidden : true ,
2626 Run : func (cmd * cobra.Command , args []string ) {
2727 actionsRun (opts )
@@ -34,28 +34,45 @@ func NewCmdActions(f *cmdutil.Factory) *cobra.Command {
3434 return cmd
3535}
3636
37- func actionsRun (opts ActionsOptions ) {
38- cs := opts .IO .ColorScheme ()
39- fmt .Fprint (opts .IO .Out , heredoc .Docf (`
40- Welcome to GitHub Actions on the command line.
37+ func actionsExplainer (cs * iostreams.ColorScheme ) string {
38+ header := "Welcome to GitHub Actions on the command line."
39+ runHeader := "Interacting with workflow runs"
40+ workflowHeader := "Interacting with workflow files"
41+ if cs != nil {
42+ header = cs .Bold (header )
43+ runHeader = cs .Bold (runHeader )
44+ workflowHeader = cs .Bold (workflowHeader )
45+ }
4146
42- This part of gh is in beta and subject to change!
47+ return heredoc .Docf (`
48+ %s
4349
44- To follow along while we get to GA, please see this
45- tracking issue: https://github.com/cli/cli/issues/2889
50+ gh integrates with Actions to help you manage runs and workflows.
4651
4752 %s
48- gh run list: List recent workflow runs
49- gh run view: View details for a workflow run or one of its jobs
50- gh run watch: Watch a workflow run while it executes
51- gh run rerun: Rerun a failed workflow run
53+ gh run list: List recent workflow runs
54+ gh run view: View details for a workflow run or one of its jobs
55+ gh run watch: Watch a workflow run while it executes
56+ gh run rerun: Rerun a failed workflow run
57+ gh run download: Download artifacts generated by runs
58+
59+ To see more help, run 'gh help run <subcommand>'
5260
5361 %s
54- gh workflow list: List all the workflow files in your repository
55- gh workflow enable: Enable a workflow file
56- gh workflow disable: Disable a workflow file
57- gh workflow run: Trigger a workflow_dispatch run for a workflow file
58- ` ,
59- cs .Bold ("Interacting with workflow runs" ),
60- cs .Bold ("Interacting with workflow files" )))
62+ gh workflow list: List all the workflow files in your repository
63+ gh workflow view: View details for a workflow file
64+ gh workflow enable: Enable a workflow file
65+ gh workflow disable: Disable a workflow file
66+ gh workflow run: Trigger a workflow_dispatch run for a workflow file
67+
68+ To see more help, run 'gh help workflow <subcommand>'
69+
70+ For more in depth help including examples, see online documentation at:
71+ https://docs.github.com/en/actions/guides/managing-github-actions-with-github-cli
72+ ` , header , runHeader , workflowHeader )
73+ }
74+
75+ func actionsRun (opts ActionsOptions ) {
76+ cs := opts .IO .ColorScheme ()
77+ fmt .Fprintln (opts .IO .Out , actionsExplainer (cs ))
6178}
0 commit comments