(args: list[str])
| 69 | |
| 70 | def _git_metadata() -> dict[str, Any]: |
| 71 | def run_git(args: list[str]) -> str | None: |
| 72 | result = subprocess.run( |
| 73 | ["git", *args], |
| 74 | cwd=REPO_ROOT, |
| 75 | capture_output=True, |
| 76 | text=True, |
| 77 | check=False, |
| 78 | ) |
| 79 | if result.returncode != 0: |
| 80 | return None |
| 81 | return result.stdout.strip() |
| 82 | |
| 83 | return { |
| 84 | "commit": run_git(["rev-parse", "--short", "HEAD"]), |