Skip to content

Quote filenames suggested at the end of worklow run #11134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cmd/workflow/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func runRun(opts *RunOptions) error {
fmt.Fprintln(out)

fmt.Fprintf(out, "To see runs for this workflow, try: %s\n",
cs.Boldf("gh run list --workflow=%s", workflow.Base()))
cs.Boldf("gh run list --workflow=%q", workflow.Base()))
}

return nil
Expand Down
10 changes: 5 additions & 5 deletions pkg/cmd/workflow/run/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ jobs:
"ref": "trunk",
},
httpStubs: stubs,
wantOut: "✓ Created workflow_dispatch event for workflow.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=workflow.yml\n",
wantOut: "✓ Created workflow_dispatch event for workflow.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=\"workflow.yml\"\n",
},
{
name: "nontty good JSON",
Expand Down Expand Up @@ -494,7 +494,7 @@ jobs:
"ref": "good-branch",
},
httpStubs: stubs,
wantOut: "✓ Created workflow_dispatch event for workflow.yml at good-branch\n\nTo see runs for this workflow, try: gh run list --workflow=workflow.yml\n",
wantOut: "✓ Created workflow_dispatch event for workflow.yml at good-branch\n\nTo see runs for this workflow, try: gh run list --workflow=\"workflow.yml\"\n",
},
{
// TODO this test is somewhat silly; it's more of a placeholder in case I decide to handle the API error more elegantly
Expand Down Expand Up @@ -634,7 +634,7 @@ jobs:
"inputs": map[string]interface{}{},
"ref": "trunk",
},
wantOut: "✓ Created workflow_dispatch event for minimal.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=minimal.yml\n",
wantOut: "✓ Created workflow_dispatch event for minimal.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=\"minimal.yml\"\n",
},
{
name: "prompt",
Expand Down Expand Up @@ -682,7 +682,7 @@ jobs:
},
"ref": "trunk",
},
wantOut: "✓ Created workflow_dispatch event for workflow.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=workflow.yml\n",
wantOut: "✓ Created workflow_dispatch event for workflow.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=\"workflow.yml\"\n",
},
{
name: "prompt, workflow choice input",
Expand Down Expand Up @@ -731,7 +731,7 @@ jobs:
},
"ref": "trunk",
},
wantOut: "✓ Created workflow_dispatch event for workflow.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=workflow.yml\n",
wantOut: "✓ Created workflow_dispatch event for workflow.yml at trunk\n\nTo see runs for this workflow, try: gh run list --workflow=\"workflow.yml\"\n",
},
{
name: "prompt, workflow choice missing input",
Expand Down
Loading