villebro commented on a change in pull request #12090:
URL: https://github.com/apache/superset/pull/12090#discussion_r553187140



##########
File path: scripts/cancel_github_workflows.py
##########
@@ -0,0 +1,222 @@
+#!/usr/bin/env python3
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""
+Manually cancel previous GitHub Action workflow runs in queue.
+
+Example:
+  # Set up
+  export GITHUB_TOKEN=394ba3b48494ab8f930fbc93
+  export GITHUB_REPOSITORY=apache/incubator-superset
+
+  # cancel previous jobs for a PR
+  ./cancel_github_workflows.py 1042
+
+  # cancel previous jobs for a branch
+  ./cancel_github_workflows.py my-branch
+
+  # cancel all jobs
+  ./cancel_github_workflows.py 1024 --include-last
+"""
+import os
+from typing import Iterable, List, Optional, Union
+
+import click
+import requests

Review comment:
       Oh wow, they've apparently relicensed. There was a refactor effort some 
time ago to remove explicit dependency on `requests` as it wasn't Apache 
compatible back then (see #7643). Good to know.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to