Skip to content

Commit a902250

Browse files
committed
fix(git): PR #319 CI — hygiene allowlist, parts guard, unused _meta
1 parent 8f4f261 commit a902250

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

scripts/git/audit_engine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def _read_commit_metadata(
420420
proc = _run_git(repo_root, "log", "-1", f"--format={fmt}", commit_hash)
421421
raw = proc.stdout or ""
422422
parts = raw.split("\x00", max_parts)
423-
if len(parts) < max_parts:
423+
if len(parts) < 5:
424424
return _CommitMetadata("", "", "", "", "")
425425
body = parts[4]
426426
oneline = parts[5] if with_oneline and len(parts) > 5 else ""
@@ -559,7 +559,7 @@ def _audit_ref(
559559
if not commit_hash:
560560
continue
561561
count += 1
562-
banned_hit, author_bad, co_bad, meta = _inspect_commit(
562+
banned_hit, author_bad, co_bad, _meta = _inspect_commit(
563563
repo_root,
564564
commit_hash,
565565
policy=policy,

scripts/review/repo_hygiene_core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
"scripts/git/check_identity.sh",
3535
"scripts/git/identity-policy.json",
3636
"scripts/git/identity-policy.schema.json",
37+
# Identity-policy unit tests reference approved policy emails by design.
38+
"tests/test_audit_engine.py",
3739
}
3840
# Personal-path leak protection (OpSec) — block any tracked file from containing
3941
# an absolute path under /Users/<anything>/ or /home/<anything>/. Developer

0 commit comments

Comments
 (0)