Skip to content

Commit aa062c8

Browse files
authored
fix: add show user members of project and allow to set username (#15)
2 parents b482b3b + 8883cc0 commit aa062c8

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

labctl/commands/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,17 @@ def show():
4040

4141
@app.command(name="set")
4242
def set_config(
43-
api_endpoint: str = typer.Option(None, help="Set the API endpoint")
43+
api_endpoint: str = typer.Option(None, help="Set the API endpoint"),
44+
username: str = typer.Option(None, help="Set the username"),
4445
):
4546
"""
4647
Set the configuration
4748
"""
4849
new_config = {}
4950
if api_endpoint:
5051
new_config["api_endpoint"] = api_endpoint
52+
if username:
53+
new_config["username"] = username
5154
if not new_config:
5255
console.print("[red]No settings provided[/red]")
5356
raise typer.Abort()

labctl/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def me(
7373
project_tree = tree.add(":open_file_folder: Projects")
7474
for project in project_list:
7575
project_tree = project_tree.add(":computer: " + project.get('name'))
76-
project_tree.add("[bold]Role:[/bold] " + project.get('type', ''))
77-
project_tree.add("Members: (WIP)")
76+
project_tree.add("[bold]Owner:[/bold] " + project.get('owner', ''))
77+
project_tree.add("Members: " + " ".join(project.get('members', [])))
7878
if not project_list:
7979
project_tree.add(":warning: No projects found")
8080

0 commit comments

Comments
 (0)