Allow workspace creation by name#244
Conversation
…too short if it is too long.
Allow creating new workspaces by project name or title, enabling agent-driven workspace creation without user interaction.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
Adds a new non-interactive CLI command to create Adobe I/O Console workspaces by specifying a project (by name/title) and workspace name, intended to support agent-driven App Builder automation.
Changes:
- Introduces
console:workspace:createcommand with client-side validation, project resolution by name/title, and duplicate workspace name checks. - Adds unit tests for the new workspace create command.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/commands/console/workspace/create.js |
Implements the new workspace creation command, including validation and Console SDK calls. |
test/commands/console/workspace/create.test.js |
Adds unit tests covering core create flows and validation failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
| title: flags.title || flags.name | ||
| } | ||
|
|
||
| // Workspace name allows only alphanumeric values |
There was a problem hiding this comment.
nit: in the future we should use schema validation and ajv
There was a problem hiding this comment.
I don't think it is worth adding ajv ... personal opinion, it is not that much to validate.
Description
Add a
console:workspace:createcommand that allows creating new workspaces by providing a project name (or title) and workspace name. This enables agents to create workspaces in App Builder projects without user interaction.Builds on #243 (project create) and follows the same patterns.
How it works
--projectName(required) which resolves by matching against both projectnameandtitlefields--name(required) for the workspace name and optional--title(defaults to name)--orgIdis optional, falling back to the configured org (same pattern as project create)consoleCLI.createWorkspace()which also enables Runtime on the new workspaceHow Has This Been Tested?
testabc123in the PRUtils project viaaio console:workspace:create --projectName PRUtils --name testabc123Types of changes
Checklist: