Move the forge helpers into bin/forge/, which chunk_preflight, chunk_pr, deploy_release and larv_review import
CI / tests (pull_request) Successful in 3m9s
CI / tests (pull_request) Successful in 3m9s
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""The pure choices the preflight's steps act on."""
|
||||
import pathlib
|
||||
|
||||
from chunk_preflight.gathered import Forge
|
||||
from forge.commands import Forge
|
||||
|
||||
# The command each forge's CLI lists pull requests with; pulls_command adds the flags that pick their rows and fields.
|
||||
PULLS_LIST: dict[Forge, tuple[str, ...]] = {"gh": ("gh", "pr", "list"), "tea": ("tea", "pulls", "list")}
|
||||
@@ -26,10 +26,6 @@ def worktree_add(branch: str, path: pathlib.Path, default: str, local: bool, pus
|
||||
return ["worktree", "add", "--quiet", "--no-track", "-b", branch, str(path), default], f"added on the new branch {branch}, made off {default}."
|
||||
|
||||
|
||||
def forge_of(origin_url: str) -> Forge:
|
||||
return "gh" if "github.com" in origin_url else "tea"
|
||||
|
||||
|
||||
def pulls_command(forge: Forge, branch: str) -> list[str]:
|
||||
"""The command that lists open pull requests: gh only branch's, by number and URL; tea every one, by index, head and URL, for facts.open_pulls to pick branch's."""
|
||||
if forge == "gh":
|
||||
|
||||
Reference in New Issue
Block a user