mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Enforce documentation change for a new-feature PR
This commit is contained in:
parent
426221cadf
commit
caee710fcc
@ -383,15 +383,16 @@ CI_CONFIG = {
|
||||
|
||||
# checks required by Mergeable Check
|
||||
REQUIRED_CHECKS = [
|
||||
"Fast test",
|
||||
"Style Check",
|
||||
"ClickHouse build check",
|
||||
"ClickHouse special build check",
|
||||
"Docs Check",
|
||||
"Fast test",
|
||||
"Stateful tests (release)",
|
||||
"Stateless tests (release)",
|
||||
"Unit tests (release-clang)",
|
||||
"Style Check",
|
||||
"Unit tests (asan)",
|
||||
"Unit tests (msan)",
|
||||
"Unit tests (release-clang)",
|
||||
"Unit tests (tsan)",
|
||||
"Unit tests (ubsan)",
|
||||
]
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import atexit
|
||||
import logging
|
||||
import subprocess
|
||||
import os
|
||||
@ -8,7 +9,7 @@ import sys
|
||||
from github import Github
|
||||
|
||||
from clickhouse_helper import ClickHouseHelper, prepare_tests_results_for_clickhouse
|
||||
from commit_status_helper import post_commit_status, get_commit
|
||||
from commit_status_helper import post_commit_status, get_commit, update_mergeable_check
|
||||
from docker_pull_helper import get_image_with_version
|
||||
from env_helper import TEMP_PATH, REPO_COPY
|
||||
from get_robot_token import get_best_robot_token
|
||||
@ -56,6 +57,7 @@ def main():
|
||||
if rerun_helper.is_already_finished_by_status():
|
||||
logging.info("Check is already finished according to github status, exiting")
|
||||
sys.exit(0)
|
||||
atexit.register(update_mergeable_check, gh, pr_info, NAME)
|
||||
|
||||
if not pr_info.has_changes_in_documentation() and not args.force:
|
||||
logging.info("No changes in documentation")
|
||||
|
@ -13,6 +13,7 @@ from commit_status_helper import (
|
||||
remove_labels,
|
||||
set_mergeable_check,
|
||||
)
|
||||
from docs_check import NAME as DOCS_NAME
|
||||
from env_helper import GITHUB_RUN_URL, GITHUB_REPOSITORY, GITHUB_SERVER_URL
|
||||
from get_robot_token import get_best_robot_token
|
||||
from pr_info import FORCE_TESTS_LABEL, PRInfo
|
||||
@ -27,6 +28,7 @@ TRUSTED_ORG_IDS = {
|
||||
OK_SKIP_LABELS = {"release", "pr-backport", "pr-cherrypick"}
|
||||
CAN_BE_TESTED_LABEL = "can be tested"
|
||||
DO_NOT_TEST_LABEL = "do not test"
|
||||
FEATURE_LABEL = "pr-feature"
|
||||
SUBMODULE_CHANGED_LABEL = "submodule changed"
|
||||
|
||||
# They are used in .github/PULL_REQUEST_TEMPLATE.md, keep comments there
|
||||
@ -249,7 +251,15 @@ if __name__ == "__main__":
|
||||
if pr_labels_to_remove:
|
||||
remove_labels(gh, pr_info, pr_labels_to_remove)
|
||||
|
||||
set_mergeable_check(commit, "skipped")
|
||||
if FEATURE_LABEL in pr_labels_to_add:
|
||||
print(f"The '{FEATURE_LABEL}' in the labels, expect the 'Docs Check' status")
|
||||
commit.create_status(
|
||||
context=DOCS_NAME,
|
||||
description=f"expect adding docs for {FEATURE_LABEL}",
|
||||
state="pending",
|
||||
)
|
||||
else:
|
||||
set_mergeable_check(commit, "skipped")
|
||||
|
||||
if description_error:
|
||||
print(
|
||||
|
Loading…
Reference in New Issue
Block a user