Add description to the commit status on failed autofix

This commit is contained in:
Mikhail f. Shiryaev 2024-04-22 12:12:53 +02:00
parent a39baf84cf
commit 0811124d7d
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -191,14 +191,14 @@ def main():
future = executor.submit(subprocess.run, cmd_shell, shell=True)
_ = future.result()
autofix_description = ""
if args.push:
try:
commit_push_staged(pr_info)
except subprocess.SubprocessError:
# do not fail the whole script if the autofix didn't work out
logging.error(
"Unable to push the autofix. Continue."
)
logging.error("Unable to push the autofix. Continue.")
autofix_description = ( "Failed to push autofix to the PR. " )
subprocess.check_call(
f"python3 ../../utils/check-style/process_style_check_result.py --in-results-dir {temp_path} "
@ -210,7 +210,7 @@ def main():
state, description, test_results, additional_files = process_result(temp_path)
JobReport(
description=description,
description=f"{autofix_description}{description}",
test_results=test_results,
status=state,
start_time=stopwatch.start_time_str,