Consider whole check failure in bugfix validate check as an error

This commit is contained in:
vdimir 2023-12-01 09:28:26 +00:00
parent 30148972ed
commit d2bea265c9
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862

View File

@ -36,6 +36,18 @@ def process_result(file_path: Path) -> Tuple[bool, TestResults]:
test_results = [] # type: TestResults
state, report_url, description = post_commit_status_from_file(file_path)
prefix = file_path.parent.name
if description.strip() in [
"Invalid check_status.tsv",
"Not found test_results.tsv",
"Empty test_results.tsv",
]:
status = (
f'Check failed (<a href="{report_url}">Report</a>)'
if report_url != "null"
else "Check failed"
)
return False, [TestResult(f"{prefix}: {description}", status)]
is_ok = state == "success"
if is_ok and report_url == "null":
return is_ok, test_results