Skip to content

Commit

Permalink
Fix verbiage for deleting workflow runs
Browse files Browse the repository at this point in the history
It's not deleting _workflows_ (which are specified in YAML)...
  • Loading branch information
akx committed Nov 4, 2024
1 parent 30066b0 commit 1c4c8e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion acceptance/testdata/workflow/run-delete.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exec gh run watch $RUN_ID --exit-status

# Delete the workflow run
exec gh run delete $RUN_ID
stdout '✓ Request to delete workflow submitted.'
stdout '✓ Request to delete workflow run submitted.'

# It takes some time for a workflow run to be deleted
sleep 5
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/run/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func runDelete(opts *DeleteOptions) error {
return err
}

fmt.Fprintf(opts.IO.Out, "%s Request to delete workflow submitted.\n", cs.SuccessIcon())
fmt.Fprintf(opts.IO.Out, "%s Request to delete workflow run submitted.\n", cs.SuccessIcon())
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/run/delete/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestRunDelete(t *testing.T) {
httpmock.REST("DELETE", fmt.Sprintf("repos/OWNER/REPO/actions/runs/%d", shared.SuccessfulRun.ID)),
httpmock.StatusStringResponse(204, ""))
},
wantOut: "✓ Request to delete workflow submitted.\n",
wantOut: "✓ Request to delete workflow run submitted.\n",
},
{
name: "not found",
Expand Down Expand Up @@ -153,7 +153,7 @@ func TestRunDelete(t *testing.T) {
httpmock.REST("DELETE", fmt.Sprintf("repos/OWNER/REPO/actions/runs/%d", shared.SuccessfulRun.ID)),
httpmock.StatusStringResponse(204, ""))
},
wantOut: "✓ Request to delete workflow submitted.\n",
wantOut: "✓ Request to delete workflow run submitted.\n",
},
}

Expand Down

0 comments on commit 1c4c8e5

Please sign in to comment.