def create_github_repository()

in src/cli/utils/cicd.py [0:0]


def create_github_repository(repository_owner: str, repository_name: str) -> None:
    """Create GitHub repository if it doesn't exist.

    Args:
        repository_owner: Owner of the repository
        repository_name: Name of the repository to create
    """
    try:
        # Check if repo exists
        result = run_command(
            [
                "gh",
                "repo",
                "view",
                f"{repository_owner}/{repository_name}",
                "--json",
                "name",
            ],
            capture_output=True,
            check=False,
        )

        if result.returncode != 0:
            # Repository doesn't exist, create it
            console.print(
                f"\nšŸ“¦ Creating GitHub repository: {repository_owner}/{repository_name}"
            )
            run_command(
                [
                    "gh",
                    "repo",
                    "create",
                    f"{repository_owner}/{repository_name}",
                    "--private",
                    "--description",
                    "Repository with goo.gle/agent-starter-pack",
                ]
            )
            console.print("āœ… GitHub repository created")
        else:
            console.print("āœ… Using existing GitHub repository")
    except subprocess.CalledProcessError as e:
        console.print(f"āŒ Failed to create/check repository: {e!s}", style="bold red")
        raise