Finish following runs with the same exit code as the first

This commit is contained in:
Mikhail f. Shiryaev 2022-07-21 18:25:22 +02:00
parent db0653758e
commit d9baa0b1f7

View File

@ -153,7 +153,11 @@ if __name__ == "__main__":
rerun_helper = RerunHelper(gh, pr_info, NAME)
if rerun_helper.is_already_finished_by_status():
logging.info("Check is already finished according to github status, exiting")
sys.exit(0)
# Finish with the same code as previous
state = rerun_helper.get_finished_status().state # type: ignore
# state == "success" -> code = 0
code = int(state != "success")
sys.exit(code)
if not os.path.exists(temp_path):
os.makedirs(temp_path)