[llvm] [workflows] Fix permissions check for creating new releases (PR #81163)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 13:07:45 PST 2024


================
@@ -77,20 +77,23 @@ def upload_files(repo, release, files):
 parser.add_argument("--token", type=str)
 parser.add_argument("--release", type=str)
 parser.add_argument("--user", type=str)
+parser.add_argument("--user-token", type=str)
 
 # Upload args
 parser.add_argument("--files", nargs="+", type=str)
 
 args = parser.parse_args()
 
-github = github.Github(args.token)
-llvm_org = github.get_organization("llvm")
+gh = github.Github(args.token)
+llvm_org = gh.get_organization("llvm")
 llvm_repo = llvm_org.get_repo("llvm-project")
+if not args.user_token:
----------------
boomanaiden154 wrote:

Why do we need this here if we only support using the `--token` flag in combination with the `--user-token` flag here? Shouldn't we be erroring out rather than setting one to the other?

https://github.com/llvm/llvm-project/pull/81163


More information about the llvm-commits mailing list