Merge pull request #43862 from ClickHouse/rerun-docs-check-on-edited

Rerun DocsCheck on edited PR description
This commit is contained in:
Alexander Gololobov 2022-12-05 13:58:32 +01:00 committed by GitHub
commit 472c5a835b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,14 +13,16 @@ import jwt
import requests # type: ignore import requests # type: ignore
import boto3 # type: ignore import boto3 # type: ignore
PULL_REQUEST_CI = "PullRequestCI"
NEED_RERUN_ON_EDITED = {
"PullRequestCI",
"DocsCheck",
}
NEED_RERUN_OR_CANCELL_WORKFLOWS = { NEED_RERUN_OR_CANCELL_WORKFLOWS = {
PULL_REQUEST_CI,
"DocsCheck",
"DocsReleaseChecks", "DocsReleaseChecks",
"BackportPR", "BackportPR",
} }.union(NEED_RERUN_ON_EDITED)
MAX_RETRY = 5 MAX_RETRY = 5
@ -334,7 +336,7 @@ def main(event):
most_recent_workflow = workflow_descriptions[-1] most_recent_workflow = workflow_descriptions[-1]
if ( if (
most_recent_workflow.status == "completed" most_recent_workflow.status == "completed"
and most_recent_workflow.name == PULL_REQUEST_CI and most_recent_workflow.name in NEED_RERUN_ON_EDITED
): ):
print( print(
"The PR's body is changed and workflow is finished. " "The PR's body is changed and workflow is finished. "