[llvm] workflows: Add a job for auditing release assets (PR #92829)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 15:25:53 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r 2a2b27d99e3faf34a593c1ed8029ed4744f1cd5d...ab0cea7d95f6313bebf57a2984d1593800ba149c .github/workflows/release-asset-audit.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- release-asset-audit.py 2024-05-20 22:21:37.000000 +0000
+++ release-asset-audit.py 2024-05-20 22:25:25.468285 +0000
@@ -2,39 +2,42 @@
import sys
token = sys.argv[1]
gh = github.Github(login_or_token=token)
-repo = gh.get_repo('llvm/llvm-project')
+repo = gh.get_repo("llvm/llvm-project")
-uploaders = set([
- 'DimitryAndric',
- 'stefanp-ibm',
- 'lei137',
- 'omjavaid',
- 'nicolerabjohn',
- 'amy-kwan',
- 'mandlebug',
- 'zmodem',
- 'androm3da',
- 'tru',
- 'rovka',
- 'rorth',
- 'quinnlp',
- 'kamaub',
- 'abrisco',
- 'jakeegan',
- 'maryammo',
- 'tstellar',
- 'github-actions[bot]'
-])
+uploaders = set(
+ [
+ "DimitryAndric",
+ "stefanp-ibm",
+ "lei137",
+ "omjavaid",
+ "nicolerabjohn",
+ "amy-kwan",
+ "mandlebug",
+ "zmodem",
+ "androm3da",
+ "tru",
+ "rovka",
+ "rorth",
+ "quinnlp",
+ "kamaub",
+ "abrisco",
+ "jakeegan",
+ "maryammo",
+ "tstellar",
+ "github-actions[bot]",
+ ]
+)
for release in repo.get_releases():
print("Release:", release.title)
for asset in release.get_assets():
created_at = asset.created_at
updated_at = "" if asset.created_at == asset.updated_at else asset.updated_at
- print(f'{asset.name} : {asset.uploader.login} [{created_at} {updated_at}] ( {asset.download_count} )')
+ print(
+ f"{asset.name} : {asset.uploader.login} [{created_at} {updated_at}] ( {asset.download_count} )"
+ )
if asset.uploader.login not in uploaders:
- print("Invalid uploader")
- sys.exit(1)
-
+ print("Invalid uploader")
+ sys.exit(1)
``````````
</details>
https://github.com/llvm/llvm-project/pull/92829
More information about the llvm-commits
mailing list