move orgs config to script

This commit is contained in:
David Lord 2025-01-11 16:18:56 -08:00
parent 0c809b1bc8
commit 09689e8928
No known key found for this signature in database
GPG key ID: 43368A7AA8CC5926
2 changed files with 5 additions and 4 deletions

View file

@ -9,12 +9,11 @@ from modify_repos.models import Script
@click.command
@click.option("-o", "--org", "orgs", multiple=True, default=["pallets"])
@click.option("-s", "--script", "script_name", required=True)
@click.option("--push/--no-push")
def cli(orgs: list[str], script_name: str, push: bool) -> None:
def cli(script_name: str, push: bool) -> None:
script_cls = Script.load_cls(script_name)
script = script_cls(orgs, push)
script = script_cls(push)
script.run()

View file

@ -84,6 +84,9 @@ class Repo:
class Script:
orgs: list[str]
target: str = "main"
branch: str
title: str
body: str
target: str = "main"
@ -91,7 +94,6 @@ class Script:
def __init__(self, orgs: list[str], push: bool) -> None:
self.clones_dir: Path = Path("clones")
self.orgs = orgs
self.push = push
@classmethod