MCPcopy Index your code
hub / github.com/AstrBotDevs/AstrBot / git

Function git

scripts/prepare_release.py:63–76  ·  view source on GitHub ↗

Run a git command in the repository root. Args: args: Arguments to pass after `git`. capture_output: Whether to capture and return stdout. Returns: Captured stdout when capture_output is true; otherwise an empty string. Raises: ReleaseError: Git exits w

(args: list[str], *, capture_output: bool = False)

Source from the content-addressed store, hash-verified

61
62
63def git(args: list[str], *, capture_output: bool = False) -> str:
64 """Run a git command in the repository root.
65
66 Args:
67 args: Arguments to pass after `git`.
68 capture_output: Whether to capture and return stdout.
69
70 Returns:
71 Captured stdout when capture_output is true; otherwise an empty string.
72
73 Raises:
74 ReleaseError: Git exits with a non-zero status.
75 """
76 return run_command(["git", *args], capture_output=capture_output)
77
78
79def ensure_clean_worktree() -> None:

Callers 5

ensure_clean_worktreeFunction · 0.85
latest_tagFunction · 0.85
release_commitsFunction · 0.85
create_release_branchFunction · 0.85
commit_and_maybe_pushFunction · 0.85

Calls 1

run_commandFunction · 0.85

Tested by

no test coverage detected