Skip to content

Commit 3a522b1

Browse files
[Github] Remove use of deprecated login_or_token (#172240)
This function was deprecated recently. Update to the auth parameter to get ahead of the deprecation.
1 parent d6715cd commit 3a522b1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.github/workflows/commit-access-review.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def count_prs(gh: github.Github, triage_list: dict, start_date: datetime.datetim
266266

267267
def main():
268268
token = sys.argv[1]
269-
gh = github.Github(login_or_token=token)
269+
gh = github.Github(auth=github.Auth.Token(token))
270270
org = gh.get_organization("llvm")
271271
repo = org.get_repo("llvm-project")
272272
one_year_ago = datetime.datetime.now() - datetime.timedelta(days=365)

.github/workflows/release-asset-audit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def _write_comment_and_exit_with_error(comment):
8080
def main():
8181
token = sys.argv[1]
8282

83-
gh = github.Github(login_or_token=token)
83+
gh = github.Github(auth=github.Auth.Token(token))
8484
repo = gh.get_repo("llvm/llvm-project")
8585

8686
for release in repo.get_releases():

llvm/utils/git/github-automation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def update_issue_project_status(self) -> None:
497497
if pr.state != "closed":
498498
return
499499

500-
gh = github.Github(login_or_token=self.token)
500+
gh = github.Github(auth=github.Auth.Token(self.token))
501501
query = """
502502
query($node_id: ID!) {
503503
node(id: $node_id) {

0 commit comments

Comments
 (0)