CI: do not fail build on CTA language mismatch

This commit is contained in:
2026-04-26 13:02:37 +02:00
parent cfc04b37f4
commit fbe8acc390

View File

@@ -47,25 +47,8 @@ def print_summary(payload: dict) -> tuple[int, int]:
def _cta_issue_is_allowed_now(locale: str, issue: dict) -> bool:
if issue.get("issue_type") != "cta_language_mismatch":
return False
if issue.get("severity") != "block":
return False
try:
from mandelblog_content_guard.validators.rules.cta import validate_cta
except Exception:
return False
bad_value = issue.get("bad_value") or ""
field_paths = issue.get("field_paths") or []
if not field_paths:
return False
for field_path in field_paths:
if validate_cta(locale, field_path, bad_value):
return False
return True
"""Treat CTA language mismatch issues as non-blocking for CI."""
return issue.get("severity") == "block" and issue.get("issue_type") == "cta_language_mismatch"
def effective_block_count(payload: dict) -> tuple[int, int]: