From 1233728ca6026f4e1b447bcf836449dff99a6934 Mon Sep 17 00:00:00 2001 From: Gabin L Date: Sun, 2 Mar 2025 12:14:55 +0100 Subject: [PATCH 1/2] fix: show members and owner of a project Signed-off-by: Gabin L --- labctl/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/labctl/main.py b/labctl/main.py index 2444869..c65a1d3 100644 --- a/labctl/main.py +++ b/labctl/main.py @@ -57,8 +57,8 @@ def me( project_tree = tree.add(":open_file_folder: Projects") for project in project_list: project_tree = project_tree.add(":computer: " + project.get('name')) - project_tree.add("[bold]Role:[/bold] " + project.get('type', '')) - project_tree.add("Members: (WIP)") + project_tree.add("[bold]Owner:[/bold] " + project.get('owner', '')) + project_tree.add("Members: " + " ".join(project.get('members', []))) if not project_list: project_tree.add(":warning: No projects found") From 8883cc0d26b8e50c7feaf1b26cfc03a8baef251e Mon Sep 17 00:00:00 2001 From: Gabin L Date: Sun, 2 Mar 2025 12:15:10 +0100 Subject: [PATCH 2/2] fix: add option to set username in cli Signed-off-by: Gabin L --- labctl/commands/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/labctl/commands/config.py b/labctl/commands/config.py index f88b47a..3c62f80 100644 --- a/labctl/commands/config.py +++ b/labctl/commands/config.py @@ -40,7 +40,8 @@ def show(): @app.command(name="set") def set_config( - api_endpoint: str = typer.Option(None, help="Set the API endpoint") + api_endpoint: str = typer.Option(None, help="Set the API endpoint"), + username: str = typer.Option(None, help="Set the username"), ): """ Set the configuration @@ -48,6 +49,8 @@ def set_config( new_config = {} if api_endpoint: new_config["api_endpoint"] = api_endpoint + if username: + new_config["username"] = username if not new_config: console.print("[red]No settings provided[/red]") raise typer.Abort()