From 715a8aef0544c4c9ee1b092604c1290b77f1b1d9 Mon Sep 17 00:00:00 2001 From: "Jiahao, Woo" Date: Mon, 5 Jan 2026 16:40:08 +0800 Subject: [PATCH] Use new auth --- scripts/post-contribution-message.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/post-contribution-message.py b/scripts/post-contribution-message.py index 177f6636..b37e483d 100644 --- a/scripts/post-contribution-message.py +++ b/scripts/post-contribution-message.py @@ -1,6 +1,6 @@ import os -from github import Github +from github import Github, Auth GITHUB_TOKEN = os.environ.get("GITHUB_TOKEN") PR_NUMBER = os.environ.get("PR_NUMBER") @@ -17,7 +17,10 @@ assert PR_NUMBER is not None PR_NUMBER_INT = int(PR_NUMBER) -gh = Github(GITHUB_TOKEN) +assert GITHUB_TOKEN is not None + +auth = Auth.Token(GITHUB_TOKEN) +gh = Github(auth=auth) repo = gh.get_repo("git-mastery/exercises") pr = repo.get_pull(PR_NUMBER_INT)