Skip to content

Commit

Permalink
fixup! chore: add a script to cancel Github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Dec 5, 2020
1 parent 84d5925 commit 8d2f297
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/cancel_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("")


Expand Down

0 comments on commit 8d2f297

Please sign in to comment.