Merge pull request #514 from AIOSAI/work/system

feat(system): fix(ci): test_git_gate falls back to repo hook copy when user copy absent
This commit is contained in:
AIPass
2026-05-03 23:50:38 -07:00
committed by GitHub
+3 -1
View File
@@ -19,7 +19,9 @@ from pathlib import Path
import pytest
HOOK_PATH = Path.home() / ".claude" / "hooks" / "git_gate.py"
_USER_HOOK = Path.home() / ".claude" / "hooks" / "git_gate.py"
_REPO_HOOK = Path(__file__).resolve().parents[4] / ".claude" / "hooks" / "git_gate.py"
HOOK_PATH = _USER_HOOK if _USER_HOOK.is_file() else _REPO_HOOK
_spec = importlib.util.spec_from_file_location("git_gate", HOOK_PATH)
_mod = importlib.util.module_from_spec(_spec)