@@ -9,39 +9,30 @@ import (
99 "github.com/spf13/cobra"
1010)
1111
12- type ActionsOptions struct {
13- IO * iostreams.IOStreams
14- }
15-
1612func NewCmdActions (f * cmdutil.Factory ) * cobra.Command {
17- opts := ActionsOptions {
18- IO : f .IOStreams ,
19- }
13+ cs := f .IOStreams .ColorScheme ()
2014
2115 cmd := & cobra.Command {
2216 Use : "actions" ,
2317 Short : "Learn about working with GitHub actions" ,
24- Long : actionsExplainer (nil ),
18+ Long : actionsExplainer (cs ),
2519 Run : func (cmd * cobra.Command , args []string ) {
26- actionsRun ( opts )
20+ fmt . Fprintln ( f . IOStreams . Out , actionsExplainer ( cs ) )
2721 },
2822 Annotations : map [string ]string {
2923 "IsActions" : "true" ,
3024 },
3125 }
3226
27+ cmdutil .DisableAuthCheck (cmd )
28+
3329 return cmd
3430}
3531
3632func actionsExplainer (cs * iostreams.ColorScheme ) string {
37- header := "Welcome to GitHub Actions on the command line."
38- runHeader := "Interacting with workflow runs"
39- workflowHeader := "Interacting with workflow files"
40- if cs != nil {
41- header = cs .Bold (header )
42- runHeader = cs .Bold (runHeader )
43- workflowHeader = cs .Bold (workflowHeader )
44- }
33+ header := cs .Bold ("Welcome to GitHub Actions on the command line." )
34+ runHeader := cs .Bold ("Interacting with workflow runs" )
35+ workflowHeader := cs .Bold ("Interacting with workflow files" )
4536
4637 return heredoc .Docf (`
4738 %s
@@ -70,8 +61,3 @@ func actionsExplainer(cs *iostreams.ColorScheme) string {
7061 <https://docs.github.com/en/actions/guides/managing-github-actions-with-github-cli>
7162 ` , header , runHeader , workflowHeader )
7263}
73-
74- func actionsRun (opts ActionsOptions ) {
75- cs := opts .IO .ColorScheme ()
76- fmt .Fprintln (opts .IO .Out , actionsExplainer (cs ))
77- }
0 commit comments