|
@@ -16,6 +16,10 @@ from package_hth_review import write_zip_file, zip_file_mode
|
|
|
|
|
|
|
|
|
|
|
|
|
def git_info(repo: Path) -> tuple[str, str]:
|
|
def git_info(repo: Path) -> tuple[str, str]:
|
|
|
|
|
+ env_head = os.environ.get("HTH_GIT_COMMIT", "").strip()
|
|
|
|
|
+ if env_head:
|
|
|
|
|
+ return env_head, os.environ.get("HTH_GIT_SHORT", env_head[:12])
|
|
|
|
|
+
|
|
|
def run(args: list[str]) -> str:
|
|
def run(args: list[str]) -> str:
|
|
|
try:
|
|
try:
|
|
|
return subprocess.check_output(args, cwd=repo, stderr=subprocess.DEVNULL, text=True).strip()
|
|
return subprocess.check_output(args, cwd=repo, stderr=subprocess.DEVNULL, text=True).strip()
|