-
Notifications
You must be signed in to change notification settings - Fork 988
feat(cli): add quiet flag to task create #19701
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
Conversation
Allows passing `--quiet` (or `-q`) to the task create command so that it only prints the ID of the task.
case fmt.Sprintf("/api/v2/organizations/%s/templates/%s/versions/%s", orgID, templateName, templateVersionName): | ||
httpapi.Write(ctx, w, http.StatusOK, codersdk.TemplateVersion{ | ||
ID: templateVersionID, | ||
}) | ||
case fmt.Sprintf("/api/v2/organizations/%s/templates/my-template", orgID): | ||
case fmt.Sprintf("/api/v2/organizations/%s/templates/%s", orgID, templateName): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by test fix
@@ -83,7 +84,8 @@ func TestTaskCreate(t *testing.T) { | |||
assert.Equal(t, templateVersionPresetID, req.TemplateVersionPresetID, "template version preset id mismatch") | |||
} | |||
|
|||
httpapi.Write(ctx, w, http.StatusCreated, codersdk.Workspace{ | |||
httpapi.Write(ctx, w, http.StatusCreated, codersdk.Task{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by test fix
manually tested to confirm it works
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Allows passing
--quiet
(or-q
) to the task create command so that it only prints the ID of the task.