From ddd48574a1ca0357a8509b1550c989ffea569678 Mon Sep 17 00:00:00 2001 From: Maximilian Schulz Date: Thu, 17 Oct 2024 12:12:43 +0200 Subject: [PATCH] authentication --- tools/pycafe/test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/pycafe/test.py b/tools/pycafe/test.py index 0c22bc73f..45a3ba542 100644 --- a/tools/pycafe/test.py +++ b/tools/pycafe/test.py @@ -4,8 +4,14 @@ from github import Github # Authenticate with GitHub -access_token = os.getenv("GITHUB_TOKEN") -g = Github(access_token) + +from github import Auth + +# using an access token + +access_token = str(os.getenv("GITHUB_TOKEN")) +auth = Auth.Token(access_token) +g = Github(auth=auth) # for repo in g.get_user().get_repos(): # print(repo.name)