mirror of
https://github.com/davidism/modify-repos.git
synced 2025-07-07 19:35:34 +00:00
move orgs config to script
This commit is contained in:
parent
0c809b1bc8
commit
09689e8928
2 changed files with 5 additions and 4 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue