Skip to content

feat: add ability to make workspace for other user from cli #8481

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
merged 3 commits into from
Jul 14, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add example to show functionality
  • Loading branch information
Emyrk committed Jul 12, 2023
commit ca260b1785943a1dc7deda135999b1aac3859c05
8 changes: 7 additions & 1 deletion cli/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ func (r *RootCmd) create() *clibase.Cmd {
Annotations: workspaceCommand,
Use: "create [name]",
Short: "Create a workspace",
Middleware: clibase.Chain(r.InitClient(client)),
Long: formatExamples(
example{
Description: "Create a workspace for another user (if you have permission)",
Command: "coder create <username>/<workspace_name>",
},
),
Middleware: clibase.Chain(r.InitClient(client)),
Handler: func(inv *clibase.Invocation) error {
organization, err := CurrentOrganization(inv, client)
if err != nil {
Expand Down