From 6a4d5a985b0f3d900f681e9a2259a242b3172f6a Mon Sep 17 00:00:00 2001 From: alesapin Date: Fri, 7 Jan 2022 12:05:38 +0300 Subject: [PATCH] Rerun docs release check as well --- tests/ci/docs_release.py | 9 +++++++-- tests/ci/workflow_approve_rerun_lambda/app.py | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/ci/docs_release.py b/tests/ci/docs_release.py index 90588848f12..825bca0b68b 100644 --- a/tests/ci/docs_release.py +++ b/tests/ci/docs_release.py @@ -2,6 +2,7 @@ import logging import subprocess import os +import sys from github import Github @@ -13,6 +14,7 @@ from ssh import SSHKey from upload_result_helper import upload_results from docker_pull_helper import get_image_with_version from commit_status_helper import get_commit +from rerun_helper import RerunHelper NAME = "Docs Release (actions)" @@ -22,9 +24,12 @@ if __name__ == "__main__": temp_path = TEMP_PATH repo_path = REPO_COPY - pr_info = PRInfo(need_changed_files=True) - gh = Github(get_best_robot_token()) + pr_info = PRInfo(need_changed_files=True) + 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) if not os.path.exists(temp_path): os.makedirs(temp_path) diff --git a/tests/ci/workflow_approve_rerun_lambda/app.py b/tests/ci/workflow_approve_rerun_lambda/app.py index f2502f605af..d4d642e0ba3 100644 --- a/tests/ci/workflow_approve_rerun_lambda/app.py +++ b/tests/ci/workflow_approve_rerun_lambda/app.py @@ -41,6 +41,7 @@ TRUSTED_ORG_IDS = { NEED_RERUN_WORKFLOWS = { 13241696, # PR + 14738810, # DocsRelease 15834118, # Docs 15522500, # MasterCI 15516108, # ReleaseCI