forked from cli/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactions.go
More file actions
76 lines (62 loc) · 1.82 KB
/
actions.go
File metadata and controls
76 lines (62 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package actions
import (
"fmt"
"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/pkg/cmdutil"
"github.com/cli/cli/pkg/iostreams"
"github.com/spf13/cobra"
)
type ActionsOptions struct {
IO *iostreams.IOStreams
}
func NewCmdActions(f *cmdutil.Factory) *cobra.Command {
opts := ActionsOptions{
IO: f.IOStreams,
}
cmd := &cobra.Command{
Use: "actions",
Short: "Learn about working with GitHub actions",
Args: cobra.ExactArgs(0),
Hidden: true,
Run: func(cmd *cobra.Command, args []string) {
actionsRun(opts)
},
}
return cmd
}
func actionsRun(opts ActionsOptions) {
cs := opts.IO.ColorScheme()
fmt.Fprint(opts.IO.Out, heredoc.Docf(`
Welcome to GitHub Actions on the command line.
This part of gh is in beta and subject to change!
To follow along while we get to GA, please see this
tracking issue: https://github.com/cli/cli/issues/2889
%s
gh run list: List recent workflow runs
gh run view: View details for a given workflow run
%s
gh job view: View details for a given job
`,
cs.Bold("Working with runs"),
cs.Bold("Working with jobs within runs")))
/*
fmt.Fprint(opts.IO.Out, heredoc.Docf(`
Welcome to GitHub Actions on the command line.
%s
gh workflow list: List workflows in the current repository
gh workflow run: Kick off a workflow run
gh workflow init: Create a new workflow
gh workflow check: Check a workflow file for correctness
%s
gh run list: List recent workflow runs
gh run view: View details for a given workflow run
gh run watch: Watch a streaming log for a workflow run
%s
gh job view: View details for a given job
gh job run: Run a given job within a workflow
`,
cs.Bold("Working with workflows"),
cs.Bold("Working with runs"),
cs.Bold("Working with jobs within runs")))
*/
}