tvalentyn commented on a change in pull request #12150:
URL: https://github.com/apache/beam/pull/12150#discussion_r449165261



##########
File path: release/src/main/scripts/download_github_actions_artifacts.py
##########
@@ -0,0 +1,231 @@
+#
+# 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.
+#
+
+"""Script for downloading GitHub Actions artifacts from 'Build python wheels' 
workflow."""
+import argparse
+import itertools
+import os
+import shutil
+import tempfile
+import time
+import zipfile
+
+import dateutil.parser
+import requests
+
+GH_API_URL_WORKLOW_FMT = (
+    
"https://api.github.com/repos/{repo_url}/actions/workflows/build_wheels.yml";
+)
+GH_API_URL_WORKFLOW_RUNS_FMT = (
+    
"https://api.github.com/repos/{repo_url}/actions/workflows/{workflow_id}/runs";
+)
+GH_WEB_URL_WORKLOW_RUN_FMT = 
"https://github.com/TobKed/beam/actions/runs/{workflow_id}";
+
+
+def parse_arguments():
+  parser = argparse.ArgumentParser(
+      description=
+      "Script for downloading GitHub Actions artifacts from 'Build python 
wheels' workflow."
+  )
+  parser.add_argument("--github-token", required=True)

Review comment:
       +1.
   I think auth information should be entered during execution as opposed to be 
passed as arguments to the script.
   If you know what minimal permissions need to be granted to the personal 
access token, that could be helpful.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to