We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d627c14 commit 04667faCopy full SHA for 04667fa
main.py
@@ -3,7 +3,7 @@
3
import sys
4
import subprocess
5
import re
6
-from github import Github # type: ignore
+from github import Github, Auth # type: ignore
7
8
9
# Constants for message titles
@@ -124,7 +124,10 @@ def add_pr_comments() -> int:
124
raise ValueError("GITHUB_REF environment variable is not set")
125
126
# Initialize GitHub client
127
- g = Github(token)
+ # Use new Auth API to avoid deprecation warning
128
+ if not token:
129
+ raise ValueError("GITHUB_TOKEN is not set")
130
+ g = Github(auth=Auth.Token(token))
131
repo = g.get_repo(repo_name)
132
pull_request = repo.get_issue(int(pr_number))
133
0 commit comments