[llvm] [Release] Add keith to valid archive uploaders (PR #106018)

Keith Smiley via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 21:06:16 PDT 2024


https://github.com/keith updated https://github.com/llvm/llvm-project/pull/106018

>From bb6a9572f384a30c0cbdc4865c763968b90beefc Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Sun, 25 Aug 2024 15:35:38 -0700
Subject: [PATCH 1/2] [Release] Add keith to valid archive uploaders

I am interested in helping contribute macOS binaries since we're
generally sporadic with uploading these.

Fixes https://github.com/llvm/llvm-project/issues/106016
---
 .github/workflows/release-asset-audit.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/release-asset-audit.py b/.github/workflows/release-asset-audit.py
index 355e7fee1dae01..ed4357526ec584 100644
--- a/.github/workflows/release-asset-audit.py
+++ b/.github/workflows/release-asset-audit.py
@@ -28,6 +28,7 @@ def main():
             "maryammo",
             "tstellar",
             "github-actions[bot]",
+            "keith",
         ]
     )
 

>From b5326484081d6d76c564544f7f933d4991d63065 Mon Sep 17 00:00:00 2001
From: Keith Smiley <keithbsmiley at gmail.com>
Date: Tue, 27 Aug 2024 21:06:04 -0700
Subject: [PATCH 2/2] Add one off binary

---
 .github/workflows/release-asset-audit.py | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release-asset-audit.py b/.github/workflows/release-asset-audit.py
index ed4357526ec584..83a798add636d8 100644
--- a/.github/workflows/release-asset-audit.py
+++ b/.github/workflows/release-asset-audit.py
@@ -1,6 +1,21 @@
 import github
 import sys
 
+_SPECIAL_CASE_BINARIES = {
+    "keith": {"clang+llvm-18.1.8-arm64-apple-macos11.tar.xz"},
+}
+
+
+def _is_valid(uploader_name, valid_uploaders, asset_name):
+    if uploader_name in valid_uploaders:
+        return True
+
+    if uploader_name in _SPECIAL_CASE_BINARIES:
+        return asset_name in _SPECIAL_CASE_BINARIES[uploader_name]
+
+    return False
+
+
 def main():
     token = sys.argv[1]
 
@@ -28,7 +43,6 @@ def main():
             "maryammo",
             "tstellar",
             "github-actions[bot]",
-            "keith",
         ]
     )
 
@@ -42,7 +56,7 @@ def main():
             print(
                 f"{asset.name} : {asset.uploader.login} [{created_at} {updated_at}] ( {asset.download_count} )"
             )
-            if asset.uploader.login not in uploaders:
+            if _is_valid(asset.uploader.login, uploaders, asset.name):
                 with open('comment', 'w') as file:
                     file.write(f'@{asset.uploader.login} is not a valid uploader.')
                 sys.exit(1)



More information about the llvm-commits mailing list