Coverage for src / repo_sync_kitty / commands / add.py: 90%
15 statements
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-23 09:31 -0500
« prev ^ index » next coverage.py v7.13.0, created at 2025-12-23 09:31 -0500
1"""Add command: add repository to manifest."""
3from pathlib import Path
4from typing import Annotated
6import typer
7from rich.console import Console
9console = Console()
12def add(
13 remote: Annotated[str, typer.Argument(help="Remote name (must exist in manifest)")],
14 slug: Annotated[str, typer.Argument(help="Repository slug (e.g., 'owner/repo')")],
15 manifest: Annotated[
16 Path | None,
17 typer.Option("--manifest", "-m", help="Path to manifest.toml file"),
18 ] = None,
19 path: Annotated[
20 Path | None,
21 typer.Option("--path", "-p", help="Local path (defaults to slug)"),
22 ] = None,
23 branch: Annotated[
24 str | None,
25 typer.Option("--branch", "-b", help="Branch to track"),
26 ] = None,
27) -> None:
28 """Add a repository to the manifest."""
29 console.print("[yellow]add command not yet implemented[/yellow]")
30 console.print(f" remote: {remote}")
31 console.print(f" slug: {slug}")
32 if manifest: 32 ↛ 33line 32 didn't jump to line 33 because the condition on line 32 was never true
33 console.print(f" manifest: {manifest}")
34 if path:
35 console.print(f" path: {path}")
36 if branch:
37 console.print(f" branch: {branch}")