(repo: Path, message: str)
| 374 | |
| 375 | |
| 376 | def _git_commit(repo: Path, message: str) -> str: |
| 377 | subprocess.run(("git", "add", "-A"), cwd=repo, check=True) |
| 378 | subprocess.run( |
| 379 | ("git", "-c", "user.name=t", "-c", "user.email=t@example.com", "commit", "-q", "-m", message), |
| 380 | cwd=repo, |
| 381 | check=True, |
| 382 | ) |
| 383 | return subprocess.run( |
| 384 | ("git", "rev-parse", "HEAD"), cwd=repo, check=True, capture_output=True, text=True |
| 385 | ).stdout.strip() |
| 386 | |
| 387 | |
| 388 | def _run_guard( |
no test coverage detected