From 19928dde097a131fbcc2b73f7ba1142c6e6ee7cc Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 14 Nov 2022 23:03:38 +0200 Subject: Unify scripts/ directory (#52) * Unify scripts/ directory * Keep build.py in root for simplicity --- ghpr.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 ghpr.py (limited to 'ghpr.py') diff --git a/ghpr.py b/ghpr.py deleted file mode 100644 index 4e9a124..0000000 --- a/ghpr.py +++ /dev/null @@ -1,25 +0,0 @@ -import sys - -from pathlib import Path -from subprocess import run - -ROOT_PATH = Path(__file__).parent - -path = sys.argv[1] - -with open(path, "r") as f: - for line in f: - l = line.strip().split(",") - domain, handle, name = [x.strip() for x in l] - - fn = domain.replace(".", "") - with open(ROOT_PATH / "names" / f"{fn}.yml", "w") as out: - s = f"domain: {domain}\nname: {name}\ngithub: {handle}\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