From 8d2f2976cd4088d1f69848cb1ba5b676f2943053 Mon Sep 17 00:00:00 2001 From: Jesse Yang Date: Fri, 4 Dec 2020 20:23:02 -0800 Subject: [PATCH] fixup! chore: add a script to cancel Github workflows --- scripts/cancel_github_workflows.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/cancel_github_workflows.py b/scripts/cancel_github_workflows.py index 8539f37c825e1..27bdba5950acc 100755 --- a/scripts/cancel_github_workflows.py +++ b/scripts/cancel_github_workflows.py @@ -152,8 +152,11 @@ def cancel_github_workflows( if head_commit["id"] != last_sha: last_sha = head_commit["id"] print_commit(head_commit) - cancel_run(repo, entry["id"]) - print(f"[Cancled] {entry['name']}") + try: + cancel_run(repo, entry["id"]) + print(f"[Cancled] {entry['name']}") + except ClickException as error: + print(f"[Cancled] {entry['name']} [Error: {error.message}]") print("")