Skip to content

Conversation

@boomanaiden154
Copy link
Contributor

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

This function was deprecated recently. Update to the auth parameter to
get ahead of the deprecation.
@llvmbot
Copy link
Member

llvmbot commented Dec 15, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

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


Full diff: https://github.com/llvm/llvm-project/pull/172240.diff

3 Files Affected:

  • (modified) .github/workflows/commit-access-review.py (+1-1)
  • (modified) .github/workflows/release-asset-audit.py (+1-1)
  • (modified) llvm/utils/git/github-automation.py (+1-1)
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) {

Copy link
Contributor

@vbvictor vbvictor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, deprecation note for context: https://pygithub.readthedocs.io/en/v1.59.0/changes.html

@boomanaiden154 boomanaiden154 merged commit 3a522b1 into llvm:main Dec 15, 2025
15 checks passed
@boomanaiden154 boomanaiden154 deleted the login-or-token-deprecation branch December 15, 2025 17:45
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Dec 19, 2025
This function was deprecated recently. Update to the auth parameter to
get ahead of the deprecation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants