From 8a0d5b0e43cef52d64e6dd2c5c6cbb4238cebe77 Mon Sep 17 00:00:00 2001 From: Cristian Dominguez Date: Tue, 13 Apr 2021 12:30:07 -0300 Subject: [PATCH 1/8] Add note about current branch detection --- pkg/cmd/pr/checks/checks.go | 9 ++++++++- pkg/cmd/pr/comment/comment.go | 8 ++++++++ pkg/cmd/pr/diff/diff.go | 9 ++++++++- pkg/cmd/pr/edit/edit.go | 6 ++++++ pkg/cmd/pr/merge/merge.go | 3 +++ pkg/cmd/pr/ready/ready.go | 9 ++++++++- 6 files changed, 41 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/pr/checks/checks.go b/pkg/cmd/pr/checks/checks.go index 515c9b0b5..1a11f3d44 100644 --- a/pkg/cmd/pr/checks/checks.go +++ b/pkg/cmd/pr/checks/checks.go @@ -7,6 +7,7 @@ import ( "sort" "time" + "github.com/MakeNowJust/heredoc" "github.com/cli/cli/api" "github.com/cli/cli/context" "github.com/cli/cli/internal/ghrepo" @@ -47,7 +48,13 @@ func NewCmdChecks(f *cmdutil.Factory, runF func(*ChecksOptions) error) *cobra.Co cmd := &cobra.Command{ Use: "checks [ | | ]", Short: "Show CI status for a single pull request", - Args: cobra.MaximumNArgs(1), + Long: heredoc.Doc(` + Show CI status for a single pull request. + + Without an argument, the pull request that belongs to the current branch + is selected. + `), + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo diff --git a/pkg/cmd/pr/comment/comment.go b/pkg/cmd/pr/comment/comment.go index b993fd407..a9ec5e9d3 100644 --- a/pkg/cmd/pr/comment/comment.go +++ b/pkg/cmd/pr/comment/comment.go @@ -28,6 +28,14 @@ func NewCmdComment(f *cmdutil.Factory, runF func(*shared.CommentableOptions) err cmd := &cobra.Command{ Use: "comment [ | | ]", Short: "Create a new pr comment", + Long: heredoc.Doc(` + Create a new pr comment. + + Without an argument, the pull request that belongs to the current branch + is selected. + + With '--web', comment on the pull request in a web browser instead. + `), Example: heredoc.Doc(` $ gh pr comment 22 --body "This looks great, lets get it deployed." `), diff --git a/pkg/cmd/pr/diff/diff.go b/pkg/cmd/pr/diff/diff.go index 2bea8072b..00a41c657 100644 --- a/pkg/cmd/pr/diff/diff.go +++ b/pkg/cmd/pr/diff/diff.go @@ -9,6 +9,7 @@ import ( "strings" "syscall" + "github.com/MakeNowJust/heredoc" "github.com/cli/cli/api" "github.com/cli/cli/context" "github.com/cli/cli/internal/ghrepo" @@ -40,7 +41,13 @@ func NewCmdDiff(f *cmdutil.Factory, runF func(*DiffOptions) error) *cobra.Comman cmd := &cobra.Command{ Use: "diff [ | | ]", Short: "View changes in a pull request", - Args: cobra.MaximumNArgs(1), + Long: heredoc.Doc(` + View changes in a pull request. + + Without an argument, the pull request that belongs to the current branch + is selected. + `), + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo diff --git a/pkg/cmd/pr/edit/edit.go b/pkg/cmd/pr/edit/edit.go index 7a01f5125..dbf0321f9 100644 --- a/pkg/cmd/pr/edit/edit.go +++ b/pkg/cmd/pr/edit/edit.go @@ -50,6 +50,12 @@ func NewCmdEdit(f *cmdutil.Factory, runF func(*EditOptions) error) *cobra.Comman cmd := &cobra.Command{ Use: "edit [ | | ]", Short: "Edit a pull request", + Long: heredoc.Doc(` + Edit a pull request. + + Without an argument, the pull request that belongs to the current branch + is selected. + `), Example: heredoc.Doc(` $ gh pr edit 23 --title "I found a bug" --body "Nothing works" $ gh pr edit 23 --add-label "bug,help wanted" --remove-label "core" diff --git a/pkg/cmd/pr/merge/merge.go b/pkg/cmd/pr/merge/merge.go index 96fb2b7f6..31a91d6be 100644 --- a/pkg/cmd/pr/merge/merge.go +++ b/pkg/cmd/pr/merge/merge.go @@ -70,6 +70,9 @@ func NewCmdMerge(f *cmdutil.Factory, runF func(*MergeOptions) error) *cobra.Comm Short: "Merge a pull request", Long: heredoc.Doc(` Merge a pull request on GitHub. + + Without an argument, the pull request that belongs to the current branch + is selected. `), Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/pkg/cmd/pr/ready/ready.go b/pkg/cmd/pr/ready/ready.go index 003902963..f21a48d45 100644 --- a/pkg/cmd/pr/ready/ready.go +++ b/pkg/cmd/pr/ready/ready.go @@ -5,6 +5,7 @@ import ( "fmt" "net/http" + "github.com/MakeNowJust/heredoc" "github.com/cli/cli/api" "github.com/cli/cli/context" "github.com/cli/cli/internal/config" @@ -38,7 +39,13 @@ func NewCmdReady(f *cmdutil.Factory, runF func(*ReadyOptions) error) *cobra.Comm cmd := &cobra.Command{ Use: "ready [ | | ]", Short: "Mark a pull request as ready for review", - Args: cobra.MaximumNArgs(1), + Long: heredoc.Doc(` + Mark a pull request as ready for review + + Without an argument, the pull request that belongs to the current branch + is displayed. + `), + Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo From efe7aa1f784ad10f1821091d201759b20ac1611f Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 13 Apr 2021 22:03:59 -0500 Subject: [PATCH 2/8] fix small bug with startup_failure conclusion --- pkg/cmd/run/view/view.go | 2 +- pkg/cmd/run/view/view_test.go | 38 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/run/view/view.go b/pkg/cmd/run/view/view.go index 9751d1f38..5bed0f7f1 100644 --- a/pkg/cmd/run/view/view.go +++ b/pkg/cmd/run/view/view.go @@ -308,7 +308,7 @@ func runView(opts *ViewOptions) error { fmt.Fprintln(out, shared.RenderRunHeader(cs, *run, utils.FuzzyAgo(ago), prNumber)) fmt.Fprintln(out) - if len(jobs) == 0 && run.Conclusion == shared.Failure { + if len(jobs) == 0 && run.Conclusion == shared.Failure || run.Conclusion == shared.StartupFailure { fmt.Fprintf(out, "%s %s\n", cs.FailureIcon(), cs.Bold("This run likely failed because of a workflow file issue.")) diff --git a/pkg/cmd/run/view/view_test.go b/pkg/cmd/run/view/view_test.go index 355ac3c68..8ddde1cd0 100644 --- a/pkg/cmd/run/view/view_test.go +++ b/pkg/cmd/run/view/view_test.go @@ -771,6 +771,44 @@ func TestViewRun(t *testing.T) { browsedURL: "jobs/10?check_suite_focus=true", wantOut: "Opening jobs/10 in your browser.\n", }, + { + name: "hide job header, failure", + tty: true, + opts: &ViewOptions{ + RunID: "123", + }, + httpStubs: func(reg *httpmock.Registry) { + reg.Register( + httpmock.REST("GET", "repos/OWNER/REPO/actions/runs/123"), + httpmock.JSONResponse(shared.TestRun("failed no job", 123, shared.Completed, shared.Failure))) + reg.Register( + httpmock.REST("GET", "runs/123/jobs"), + httpmock.JSONResponse(shared.JobsPayload{Jobs: []shared.Job{}})) + reg.Register( + httpmock.REST("GET", "repos/OWNER/REPO/actions/runs/123/artifacts"), + httpmock.StringResponse(`{}`)) + }, + wantOut: "\nX trunk failed no job · 123\nTriggered via push about 59 minutes ago\n\nX This run likely failed because of a workflow file issue.\n\nFor more information, see: runs/123\n", + }, + { + name: "hide job header, startup_failure", + tty: true, + opts: &ViewOptions{ + RunID: "123", + }, + httpStubs: func(reg *httpmock.Registry) { + reg.Register( + httpmock.REST("GET", "repos/OWNER/REPO/actions/runs/123"), + httpmock.JSONResponse(shared.TestRun("failed no job", 123, shared.Completed, shared.StartupFailure))) + reg.Register( + httpmock.REST("GET", "runs/123/jobs"), + httpmock.JSONResponse(shared.JobsPayload{Jobs: []shared.Job{}})) + reg.Register( + httpmock.REST("GET", "repos/OWNER/REPO/actions/runs/123/artifacts"), + httpmock.StringResponse(`{}`)) + }, + wantOut: "\nX trunk failed no job · 123\nTriggered via push about 59 minutes ago\n\nX This run likely failed because of a workflow file issue.\n\nFor more information, see: runs/123\n", + }, } for _, tt := range tests { From 4e281153f66f32649577620e356f5390022391d8 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 13 Apr 2021 22:06:06 -0500 Subject: [PATCH 3/8] incorporate wording feedback --- pkg/cmd/actions/actions.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/actions/actions.go b/pkg/cmd/actions/actions.go index 5be2df305..0891c7820 100644 --- a/pkg/cmd/actions/actions.go +++ b/pkg/cmd/actions/actions.go @@ -47,7 +47,7 @@ func actionsExplainer(cs *iostreams.ColorScheme) string { return heredoc.Docf(` %s - gh integrates with Actions to help you manage runs and workflows. + GitHub CLI integrates with Actions to help you manage runs and workflows. %s gh run list: List recent workflow runs From cd8ec471637cf39d346754b73900c0ebb5449472 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 13 Apr 2021 22:08:06 -0500 Subject: [PATCH 4/8] unhide actions commands --- pkg/cmd/actions/actions.go | 7 +++---- pkg/cmd/run/run.go | 7 +++---- pkg/cmd/workflow/workflow.go | 7 +++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/pkg/cmd/actions/actions.go b/pkg/cmd/actions/actions.go index 0891c7820..33ba4b1a7 100644 --- a/pkg/cmd/actions/actions.go +++ b/pkg/cmd/actions/actions.go @@ -19,10 +19,9 @@ func NewCmdActions(f *cmdutil.Factory) *cobra.Command { } cmd := &cobra.Command{ - Use: "actions", - Short: "Learn about working with GitHub actions", - Long: actionsExplainer(nil), - Hidden: true, + Use: "actions", + Short: "Learn about working with GitHub actions", + Long: actionsExplainer(nil), Run: func(cmd *cobra.Command, args []string) { actionsRun(opts) }, diff --git a/pkg/cmd/run/run.go b/pkg/cmd/run/run.go index 7bb45b4ce..d61e350d3 100644 --- a/pkg/cmd/run/run.go +++ b/pkg/cmd/run/run.go @@ -12,10 +12,9 @@ import ( func NewCmdRun(f *cmdutil.Factory) *cobra.Command { cmd := &cobra.Command{ - Use: "run ", - Short: "View details about workflow runs", - Long: "List, view, and watch recent workflow runs from GitHub Actions.", - Hidden: true, + Use: "run ", + Short: "View details about workflow runs", + Long: "List, view, and watch recent workflow runs from GitHub Actions.", Annotations: map[string]string{ "IsActions": "true", }, diff --git a/pkg/cmd/workflow/workflow.go b/pkg/cmd/workflow/workflow.go index f6f59f313..4af1fdc99 100644 --- a/pkg/cmd/workflow/workflow.go +++ b/pkg/cmd/workflow/workflow.go @@ -12,10 +12,9 @@ import ( func NewCmdWorkflow(f *cmdutil.Factory) *cobra.Command { cmd := &cobra.Command{ - Use: "workflow ", - Short: "View details about GitHub Actions workflows", - Long: "List, view, and run workflows in GitHub Actions.", - Hidden: true, + Use: "workflow ", + Short: "View details about GitHub Actions workflows", + Long: "List, view, and run workflows in GitHub Actions.", Annotations: map[string]string{ "IsActions": "true", }, From 04844256ddc1da0217425b46889c64998b3d19cc Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 13 Apr 2021 22:10:32 -0500 Subject: [PATCH 5/8] annotation fixes --- pkg/cmd/run/list/list.go | 7 +++---- pkg/cmd/run/view/view.go | 7 +++---- pkg/cmd/run/watch/watch.go | 3 --- pkg/cmd/workflow/view/view.go | 7 +++---- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/pkg/cmd/run/list/list.go b/pkg/cmd/run/list/list.go index b6598dac3..2785be7ae 100644 --- a/pkg/cmd/run/list/list.go +++ b/pkg/cmd/run/list/list.go @@ -36,10 +36,9 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman } cmd := &cobra.Command{ - Use: "list", - Short: "List recent workflow runs", - Args: cobra.NoArgs, - Hidden: true, + Use: "list", + Short: "List recent workflow runs", + Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo diff --git a/pkg/cmd/run/view/view.go b/pkg/cmd/run/view/view.go index 5bed0f7f1..584c55634 100644 --- a/pkg/cmd/run/view/view.go +++ b/pkg/cmd/run/view/view.go @@ -87,10 +87,9 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman } cmd := &cobra.Command{ - Use: "view []", - Short: "View a summary of a workflow run", - Args: cobra.MaximumNArgs(1), - Hidden: true, + Use: "view []", + Short: "View a summary of a workflow run", + Args: cobra.MaximumNArgs(1), Example: heredoc.Doc(` # Interactively select a run to view, optionally drilling down to a job $ gh run view diff --git a/pkg/cmd/run/watch/watch.go b/pkg/cmd/run/watch/watch.go index 41162e3be..69c34abf5 100644 --- a/pkg/cmd/run/watch/watch.go +++ b/pkg/cmd/run/watch/watch.go @@ -42,9 +42,6 @@ func NewCmdWatch(f *cmdutil.Factory, runF func(*WatchOptions) error) *cobra.Comm cmd := &cobra.Command{ Use: "watch ", Short: "Watch a run until it completes, showing its progress", - Annotations: map[string]string{ - "IsActions": "true", - }, RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo diff --git a/pkg/cmd/workflow/view/view.go b/pkg/cmd/workflow/view/view.go index 4cb49ac26..5cce07991 100644 --- a/pkg/cmd/workflow/view/view.go +++ b/pkg/cmd/workflow/view/view.go @@ -40,10 +40,9 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman } cmd := &cobra.Command{ - Use: "view [ | | ]", - Short: "View the summary of a workflow", - Args: cobra.MaximumNArgs(1), - Hidden: true, + Use: "view [ | | ]", + Short: "View the summary of a workflow", + Args: cobra.MaximumNArgs(1), Example: heredoc.Doc(` # Interactively select a workflow to view $ gh workflow view From a85ef9273fe496f0c3b1d03632444dd6357fbb45 Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 13 Apr 2021 22:42:38 -0500 Subject: [PATCH 6/8] bump run list limit --- pkg/cmd/run/list/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/run/list/list.go b/pkg/cmd/run/list/list.go index 2785be7ae..3679a8333 100644 --- a/pkg/cmd/run/list/list.go +++ b/pkg/cmd/run/list/list.go @@ -15,7 +15,7 @@ import ( ) const ( - defaultLimit = 10 + defaultLimit = 20 ) type ListOptions struct { From e10a3f164f9569d7ab68d176458c3594ccc09dac Mon Sep 17 00:00:00 2001 From: vilmibm Date: Tue, 13 Apr 2021 22:43:02 -0500 Subject: [PATCH 7/8] minor usage improvements --- pkg/cmd/run/rerun/rerun.go | 2 +- pkg/cmd/run/view/view.go | 20 ++++++++++---------- pkg/cmd/run/watch/watch.go | 10 +++++++++- pkg/cmd/workflow/disable/disable.go | 1 + pkg/cmd/workflow/enable/enable.go | 1 + pkg/cmd/workflow/list/list.go | 3 ++- pkg/cmd/workflow/run/run.go | 2 +- 7 files changed, 25 insertions(+), 14 deletions(-) diff --git a/pkg/cmd/run/rerun/rerun.go b/pkg/cmd/run/rerun/rerun.go index 45bc320e1..16f940213 100644 --- a/pkg/cmd/run/rerun/rerun.go +++ b/pkg/cmd/run/rerun/rerun.go @@ -31,7 +31,7 @@ func NewCmdRerun(f *cmdutil.Factory, runF func(*RerunOptions) error) *cobra.Comm cmd := &cobra.Command{ Use: "rerun []", - Short: "Rerun a given run", + Short: "Rerun a failed run", Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override diff --git a/pkg/cmd/run/view/view.go b/pkg/cmd/run/view/view.go index 584c55634..131c73a82 100644 --- a/pkg/cmd/run/view/view.go +++ b/pkg/cmd/run/view/view.go @@ -91,20 +91,20 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman Short: "View a summary of a workflow run", Args: cobra.MaximumNArgs(1), Example: heredoc.Doc(` - # Interactively select a run to view, optionally drilling down to a job - $ gh run view - - # View a specific run - $ gh run view 12345 - + # Interactively select a run to view, optionally selecting a single job + $ gh run view + + # View a specific run + $ gh run view 12345 + # View a specific job within a run $ gh run view --job 456789 - + # View the full log for a specific job $ gh run view --log --job 456789 - - # Exit non-zero if a run failed - $ gh run view 0451 --exit-status && echo "run pending or passed" + + # Exit non-zero if a run failed + $ gh run view 0451 --exit-status && echo "run pending or passed" `), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override diff --git a/pkg/cmd/run/watch/watch.go b/pkg/cmd/run/watch/watch.go index 69c34abf5..599dac345 100644 --- a/pkg/cmd/run/watch/watch.go +++ b/pkg/cmd/run/watch/watch.go @@ -7,6 +7,7 @@ import ( "runtime" "time" + "github.com/MakeNowJust/heredoc" "github.com/cli/cli/api" "github.com/cli/cli/internal/ghrepo" "github.com/cli/cli/pkg/cmd/run/shared" @@ -40,8 +41,15 @@ func NewCmdWatch(f *cmdutil.Factory, runF func(*WatchOptions) error) *cobra.Comm } cmd := &cobra.Command{ - Use: "watch ", + Use: "watch ", Short: "Watch a run until it completes, showing its progress", + Example: heredoc.Doc(` + # Watch a run until it's done + gh run watch + + # Run some other command when the run is finished + gh run watch && notify-send "run is done!" + `), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override opts.BaseRepo = f.BaseRepo diff --git a/pkg/cmd/workflow/disable/disable.go b/pkg/cmd/workflow/disable/disable.go index a55a88240..3b87d5599 100644 --- a/pkg/cmd/workflow/disable/disable.go +++ b/pkg/cmd/workflow/disable/disable.go @@ -31,6 +31,7 @@ func NewCmdDisable(f *cmdutil.Factory, runF func(*DisableOptions) error) *cobra. cmd := &cobra.Command{ Use: "disable [ | ]", Short: "Disable a workflow", + Long: "Disable a workflow, preventing it from running or showing up when listing workflows.", Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override diff --git a/pkg/cmd/workflow/enable/enable.go b/pkg/cmd/workflow/enable/enable.go index 004a4adb5..775ec89f5 100644 --- a/pkg/cmd/workflow/enable/enable.go +++ b/pkg/cmd/workflow/enable/enable.go @@ -31,6 +31,7 @@ func NewCmdEnable(f *cmdutil.Factory, runF func(*EnableOptions) error) *cobra.Co cmd := &cobra.Command{ Use: "enable [ | ]", Short: "Enable a workflow", + Long: "Enable a workflow, allowing it to be run and show up when listing workflows.", Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override diff --git a/pkg/cmd/workflow/list/list.go b/pkg/cmd/workflow/list/list.go index d1f164436..94291bcc7 100644 --- a/pkg/cmd/workflow/list/list.go +++ b/pkg/cmd/workflow/list/list.go @@ -34,7 +34,8 @@ func NewCmdList(f *cmdutil.Factory, runF func(*ListOptions) error) *cobra.Comman cmd := &cobra.Command{ Use: "list", - Short: "List GitHub Actions workflows", + Short: "List workflows", + Long: "List workflow files, hiding disabled workflows by default.", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { // support `-R, --repo` override diff --git a/pkg/cmd/workflow/run/run.go b/pkg/cmd/workflow/run/run.go index 6e732cb69..7669c174e 100644 --- a/pkg/cmd/workflow/run/run.go +++ b/pkg/cmd/workflow/run/run.go @@ -47,7 +47,7 @@ func NewCmdRun(f *cmdutil.Factory, runF func(*RunOptions) error) *cobra.Command cmd := &cobra.Command{ Use: "run [ | ]", - Short: "Create a dispatch event for a workflow, starting a run", + Short: "Run a workflow by creating a workflow_dispatch event", Long: heredoc.Doc(` Create a workflow_dispatch event for a given workflow. From bca828be2cc017a8a1aee50192486afc2fe54eda Mon Sep 17 00:00:00 2001 From: vilmibm Date: Wed, 14 Apr 2021 11:17:12 -0500 Subject: [PATCH 8/8] placeholder consistency --- pkg/cmd/workflow/disable/disable.go | 2 +- pkg/cmd/workflow/enable/enable.go | 2 +- pkg/cmd/workflow/run/run.go | 2 +- pkg/cmd/workflow/view/view.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/workflow/disable/disable.go b/pkg/cmd/workflow/disable/disable.go index 3b87d5599..725c13f1a 100644 --- a/pkg/cmd/workflow/disable/disable.go +++ b/pkg/cmd/workflow/disable/disable.go @@ -29,7 +29,7 @@ func NewCmdDisable(f *cmdutil.Factory, runF func(*DisableOptions) error) *cobra. } cmd := &cobra.Command{ - Use: "disable [ | ]", + Use: "disable [ | ]", Short: "Disable a workflow", Long: "Disable a workflow, preventing it from running or showing up when listing workflows.", Args: cobra.MaximumNArgs(1), diff --git a/pkg/cmd/workflow/enable/enable.go b/pkg/cmd/workflow/enable/enable.go index 775ec89f5..2e2abdc76 100644 --- a/pkg/cmd/workflow/enable/enable.go +++ b/pkg/cmd/workflow/enable/enable.go @@ -29,7 +29,7 @@ func NewCmdEnable(f *cmdutil.Factory, runF func(*EnableOptions) error) *cobra.Co } cmd := &cobra.Command{ - Use: "enable [ | ]", + Use: "enable [ | ]", Short: "Enable a workflow", Long: "Enable a workflow, allowing it to be run and show up when listing workflows.", Args: cobra.MaximumNArgs(1), diff --git a/pkg/cmd/workflow/run/run.go b/pkg/cmd/workflow/run/run.go index 7669c174e..1d0370242 100644 --- a/pkg/cmd/workflow/run/run.go +++ b/pkg/cmd/workflow/run/run.go @@ -46,7 +46,7 @@ func NewCmdRun(f *cmdutil.Factory, runF func(*RunOptions) error) *cobra.Command } cmd := &cobra.Command{ - Use: "run [ | ]", + Use: "run [ | ]", Short: "Run a workflow by creating a workflow_dispatch event", Long: heredoc.Doc(` Create a workflow_dispatch event for a given workflow. diff --git a/pkg/cmd/workflow/view/view.go b/pkg/cmd/workflow/view/view.go index 5cce07991..14ce6c69d 100644 --- a/pkg/cmd/workflow/view/view.go +++ b/pkg/cmd/workflow/view/view.go @@ -40,7 +40,7 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman } cmd := &cobra.Command{ - Use: "view [ | | ]", + Use: "view [ | | ]", Short: "View the summary of a workflow", Args: cobra.MaximumNArgs(1), Example: heredoc.Doc(`