mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Add early exit on freshly opened PR to not process labels
This commit is contained in:
parent
cd2e1cfada
commit
cbbef49e9a
@ -304,6 +304,12 @@ def main(event):
|
||||
pull_request = event_data["pull_request"]
|
||||
labels = {label["name"] for label in pull_request["labels"]}
|
||||
print("PR has labels", labels)
|
||||
if action == "opened" or (
|
||||
action == "labeled" and pull_request["created_at"] == pull_request["updated_at"]
|
||||
):
|
||||
print("Freshly opened PR, nothing to do")
|
||||
return
|
||||
|
||||
if action == "closed" or (action == "labeled" and "do not test" in labels):
|
||||
print("PR merged/closed or manually labeled 'do not test' will kill workflows")
|
||||
workflow_descriptions = get_workflows_description_for_pull_request(
|
||||
|
Loading…
Reference in New Issue
Block a user