Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 66bb8e2

Browse files
authored
Rename remove CLI command for archive (#709)
This is now `workspace archive` Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent f313dda commit 66bb8e2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/codegate/pipeline/cli/commands.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def subcommands(self) -> Dict[str, Callable[[List[str]], Awaitable[str]]]:
153153
"list": self._list_workspaces,
154154
"add": self._add_workspace,
155155
"activate": self._activate_workspace,
156-
"remove": self._remove_workspace,
156+
"archive": self._archive_workspace,
157157
"rename": self._rename_workspace,
158158
"list-archived": self._list_archived_workspaces,
159159
"restore": self._restore_workspace,
@@ -249,16 +249,16 @@ async def _activate_workspace(self, flags: Dict[str, str], args: List[str]) -> s
249249
return "An error occurred while activating the workspace"
250250
return f"Workspace **{workspace_name}** has been activated"
251251

252-
async def _remove_workspace(self, flags: Dict[str, str], args: List[str]) -> str:
252+
async def _archive_workspace(self, flags: Dict[str, str], args: List[str]) -> str:
253253
"""
254254
Remove a workspace
255255
"""
256256
if args is None or len(args) == 0:
257-
return "Please provide a name. Use `codegate workspace remove workspace_name`"
257+
return "Please provide a name. Use `codegate workspace archive workspace_name`"
258258

259259
workspace_name = args[0]
260260
if not workspace_name:
261-
return "Please provide a name. Use `codegate workspace remove workspace_name`"
261+
return "Please provide a name. Use `codegate workspace archive workspace_name`"
262262

263263
try:
264264
await self.workspace_crud.soft_delete_workspace(workspace_name)
@@ -267,8 +267,8 @@ async def _remove_workspace(self, flags: Dict[str, str], args: List[str]) -> str
267267
except crud.WorkspaceCrudError as e:
268268
return str(e)
269269
except Exception:
270-
return "An error occurred while removing the workspace"
271-
return f"Workspace **{workspace_name}** has been removed"
270+
return "An error occurred while archiving the workspace"
271+
return f"Workspace **{workspace_name}** has been archived"
272272

273273
async def _list_archived_workspaces(self, flags: Dict[str, str], args: List[str]) -> str:
274274
"""
@@ -337,7 +337,7 @@ def help(self) -> str:
337337
"- `activate`: Activate a workspace\n\n"
338338
" - *args*:\n\n"
339339
" - `workspace_name`\n\n"
340-
"- `remove`: Remove a workspace\n\n"
340+
"- `archive`: Archive a workspace\n\n"
341341
" - *args*:\n\n"
342342
" - `workspace_name`\n\n"
343343
"- `rename`: Rename a workspace\n\n"

0 commit comments

Comments
 (0)