[llvm] [Github] Remove use of deprecated login_or_token (PR #172240)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 14 17:06:51 PST 2025


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/172240

This function was deprecated recently. Update to the auth parameter to get ahead of the deprecation.

>From 3a02329f97eb16f20c90cbcea9f7aec26b94bc71 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Mon, 15 Dec 2025 01:05:34 +0000
Subject: [PATCH] [Github] Remove use of deprecated login_or_token

This function was deprecated recently. Update to the auth parameter to
get ahead of the deprecation.
---
 .github/workflows/commit-access-review.py | 2 +-
 .github/workflows/release-asset-audit.py  | 2 +-
 llvm/utils/git/github-automation.py       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/commit-access-review.py b/.github/workflows/commit-access-review.py
index 52b9fd35290e5..338bdcbca6607 100644
--- a/.github/workflows/commit-access-review.py
+++ b/.github/workflows/commit-access-review.py
@@ -266,7 +266,7 @@ def count_prs(gh: github.Github, triage_list: dict, start_date: datetime.datetim
 
 def main():
     token = sys.argv[1]
-    gh = github.Github(login_or_token=token)
+    gh = github.Github(auth=github.Auth.Token(token))
     org = gh.get_organization("llvm")
     repo = org.get_repo("llvm-project")
     one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)
diff --git a/.github/workflows/release-asset-audit.py b/.github/workflows/release-asset-audit.py
index 0cff6c695921f..47e71a3a9a506 100644
--- a/.github/workflows/release-asset-audit.py
+++ b/.github/workflows/release-asset-audit.py
@@ -80,7 +80,7 @@ def _write_comment_and_exit_with_error(comment):
 def main():
     token = sys.argv[1]
 
-    gh = github.Github(login_or_token=token)
+    gh = github.Github(auth=github.Auth.Token(token))
     repo = gh.get_repo("llvm/llvm-project")
 
     for release in repo.get_releases():
diff --git a/llvm/utils/git/github-automation.py b/llvm/utils/git/github-automation.py
index 6e4417ec85819..ea7a7bf1945cd 100755
--- a/llvm/utils/git/github-automation.py
+++ b/llvm/utils/git/github-automation.py
@@ -497,7 +497,7 @@ def update_issue_project_status(self) -> None:
         if pr.state != "closed":
             return
 
-        gh = github.Github(login_or_token=self.token)
+        gh = github.Github(auth=github.Auth.Token(self.token))
         query = """
             query($node_id: ID!) {
               node(id: $node_id) {



More information about the llvm-commits mailing list