config: one resolver for which remote this board rides
github.remote() decided it for PRs; sync assumed 'origin'. The answer moves to config, which already owns BOARD_GIT_REMOTE, resolved on demand so config still shells out nothing at import. github.remote() becomes a thin call to it, and git_remotes() lets a caller check whether the name resolves to a remote that exists rather than falling back silently. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,11 +39,9 @@ def _run(cmd: list[str], cwd: Path | None = None, timeout: int = 60) -> subproce
|
||||
|
||||
|
||||
def remote() -> str | None:
|
||||
if config.GIT_REMOTE:
|
||||
return config.GIT_REMOTE
|
||||
result = _run(["git", "remote"])
|
||||
names = result.stdout.split()
|
||||
return names[0] if names else None
|
||||
"""Where this board's work goes. Resolved in config, which sync asks
|
||||
too — the two halves of team mode must never name different remotes."""
|
||||
return config.git_remote()
|
||||
|
||||
|
||||
def gh_available() -> bool:
|
||||
|
||||
Reference in New Issue
Block a user