File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
import github
2
2
import sys
3
3
4
+ _SPECIAL_CASE_BINARIES = {
5
+ "keith" : {"clang+llvm-18.1.8-arm64-apple-macos11.tar.xz" },
6
+ }
7
+
8
+
9
+ def _is_valid (uploader_name , valid_uploaders , asset_name ):
10
+ if uploader_name in valid_uploaders :
11
+ return True
12
+
13
+ if uploader_name in _SPECIAL_CASE_BINARIES :
14
+ return asset_name in _SPECIAL_CASE_BINARIES [uploader_name ]
15
+
16
+ return False
17
+
18
+
4
19
def main ():
5
20
token = sys .argv [1 ]
6
21
@@ -41,7 +56,7 @@ def main():
41
56
print (
42
57
f"{ asset .name } : { asset .uploader .login } [{ created_at } { updated_at } ] ( { asset .download_count } )"
43
58
)
44
- if asset .uploader .login not in uploaders :
59
+ if not _is_valid ( asset .uploader .login , uploaders , asset . name ) :
45
60
with open ('comment' , 'w' ) as file :
46
61
file .write (f'@{ asset .uploader .login } is not a valid uploader.' )
47
62
sys .exit (1 )
You can’t perform that action at this time.
0 commit comments