From 2e0755cc68e14bda95abe9472754ae5f4e760a04 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Sun, 15 Jun 2025 13:44:16 +0200 Subject: Remove all old files before migration --- cli/ghpr.py | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 cli/ghpr.py (limited to 'cli/ghpr.py') diff --git a/cli/ghpr.py b/cli/ghpr.py deleted file mode 100644 index 926a338..0000000 --- a/cli/ghpr.py +++ /dev/null @@ -1,37 +0,0 @@ -import click - -from pathlib import Path - -from .base import cli - -ROOT_PATH = Path(__file__).parents[1] - - -@cli.command() -@click.argument("path", type=click.Path()) -def ghpr(path): - with open(path, "r") as f: - for line in f: - domain, handle, name = [x.strip() for x in line.strip().split(",")] - handle = None if "@" in handle else handle - - fn = domain.replace(".", "") - - path = ROOT_PATH / "names" / f"{fn}.yml" - if path.exists(): - print(f"{domain} already exists") - continue - - with open(path, "w") as out: - s = f"domain: {domain}\nname: {name}\n" - if handle: - s += f"github: {handle}\n" - s += "candidate: true\n" - out.write(s) - - # run(["git", "checkout", "-b", domain]) - # run(["git", "add", f"names/{fn}.yml"]) - # run(["git", "commit", "-m", f"Add {domain}"]) - # run(["git", "push", "-u", "origin", domain]) - # run(["gh", "pr", "create", "-t", f"Add {domain}", "-b", f"Hey @{handle}, would you like to merge this PR adding you to https://namehack.club?"]) - # run(["git", "checkout", "main"]) -- cgit v1.3.1