mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Update pr_info.labels in commit_helper lebel helpers
This commit is contained in:
parent
caee710fcc
commit
222176639d
@ -95,6 +95,7 @@ def remove_labels(gh: Github, pr_info: PRInfo, labels_names: List[str]) -> None:
|
||||
pull_request = repo.get_pull(pr_info.number)
|
||||
for label in labels_names:
|
||||
pull_request.remove_from_labels(label)
|
||||
pr_info.labels.remove(label)
|
||||
|
||||
|
||||
def post_labels(gh: Github, pr_info: PRInfo, labels_names: List[str]) -> None:
|
||||
@ -102,6 +103,7 @@ def post_labels(gh: Github, pr_info: PRInfo, labels_names: List[str]) -> None:
|
||||
pull_request = repo.get_pull(pr_info.number)
|
||||
for label in labels_names:
|
||||
pull_request.add_to_labels(label)
|
||||
pr_info.labels.add(label)
|
||||
|
||||
|
||||
def format_description(description: str) -> str:
|
||||
|
@ -251,7 +251,7 @@ if __name__ == "__main__":
|
||||
if pr_labels_to_remove:
|
||||
remove_labels(gh, pr_info, pr_labels_to_remove)
|
||||
|
||||
if FEATURE_LABEL in pr_labels_to_add:
|
||||
if FEATURE_LABEL in pr_info.labels:
|
||||
print(f"The '{FEATURE_LABEL}' in the labels, expect the 'Docs Check' status")
|
||||
commit.create_status(
|
||||
context=DOCS_NAME,
|
||||
|
Loading…
Reference in New Issue
Block a user