Fix CI workflow and hook validation
Some checks failed
CI / test (push) Failing after 13s
CI / build (push) Has been skipped

This commit is contained in:
2026-02-04 17:26:46 +00:00
parent acb965a00f
commit 94165a1fda

View File

@@ -1,5 +1,3 @@
"""Git hook integration for prepare-commit-msg."""
import os
import shutil
from dataclasses import dataclass
@@ -87,6 +85,19 @@ exec commit-gen hook "$@"
try:
hook_path = self.get_hook_path()
if not self.repo_path.exists():
return HookResult(
success=False,
message=f"Repository path does not exist: {self.repo_path}"
)
git_dir = self.repo_path / ".git"
if not git_dir.exists():
return HookResult(
success=False,
message=f"Git directory not found: {git_dir}. Are you in a git repository?"
)
if not self.hooks_dir.exists():
return HookResult(
success=False,