[llvm] [workflows] Fix permissions check for creating new releases (PR #81163)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 09:44:41 PST 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 4520b478d2512b0f39764e0464dcb4cb961845b5...e7eaed8d0b9145ec89e05863f2272932cbaf8ce5 llvm/utils/release/github-upload-release.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- github-upload-release.py 2024-02-08 17:40:23.000000 +0000
+++ github-upload-release.py 2024-02-08 17:44:33.669525 +0000
@@ -91,11 +91,15 @@
args.user_token = args.token
if args.user:
# Validate that this user is allowed to modify releases.
user = gh.get_user(args.user)
- team = github.Github(args.user_token).get_organization("llvm").get_team_by_slug("llvm-release-managers")
+ team = (
+ github.Github(args.user_token)
+ .get_organization("llvm")
+ .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")
``````````
</details>
https://github.com/llvm/llvm-project/pull/81163
More information about the llvm-commits
mailing list