[llvm] workflows: Refactor release-tasks.yml (PR #69523)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 18 14:17:15 PDT 2023
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 0ae998c4aebbae7193b13ccc7ca525241b571be4..aa450f14105c6573b1c8df2bbfc4ecbc490417bc llvm/utils/release/github-upload-release.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- github-upload-release.py 2023-10-18 21:05:12.000000 +0000
+++ github-upload-release.py 2023-10-18 21:17:07.974291 +0000
@@ -55,11 +55,13 @@
release.upload_asset(f)
print("Done")
parser = argparse.ArgumentParser()
-parser.add_argument("command", type=str, choices=["create", "upload", "check-permissions"])
+parser.add_argument(
+ "command", type=str, choices=["create", "upload", "check-permissions"]
+)
# All args
parser.add_argument("--token", type=str)
parser.add_argument("--release", type=str)
parser.add_argument("--user", type=str)
@@ -74,17 +76,17 @@
llvm_repo = llvm_org.get_repo("llvm-project")
if args.user:
# Validate that this user is allowed to modify releases.
user = github.get_user(args.user)
- team = llvm_org.get_team_by_slug('llvm-release-managers')
+ team = llvm_org.get_team_by_slug("llvm-release-managers")
if not team.has_in_members(user):
print("User {} is not a allowed to modify releases".format(args.user))
sys.exit(1)
elif args.command == "check-permissions":
- print("--user option required for check-permissions")
- sys.exit(1)
+ print("--user option required for check-permissions")
+ sys.exit(1)
if args.command == "create":
create_release(llvm_repo, args.release, args.user)
if args.command == "upload":
upload_files(llvm_repo, args.release, args.files)
``````````
</details>
https://github.com/llvm/llvm-project/pull/69523
More information about the llvm-commits
mailing list