From 5827074c7a754bc9743c349929b0cd65176a567d Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Sun, 5 May 2024 22:06:46 +0300 Subject: [PATCH] Start using the new GitHub Auth parameters introduced in PyGithub==1.59.0 --- tcms_github_app/issues.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tcms_github_app/issues.py b/tcms_github_app/issues.py index ff79555..59ff6a3 100644 --- a/tcms_github_app/issues.py +++ b/tcms_github_app/issues.py @@ -34,11 +34,13 @@ def _rpc_connection(self): installation = installations.first() - gh_app = github.GithubIntegration(settings.KIWI_GITHUB_APP_ID, - settings.KIWI_GITHUB_APP_PRIVATE_KEY) + gh_app = github.GithubIntegration( + auth=github.Auth.AppAuth(settings.KIWI_GITHUB_APP_ID, + settings.KIWI_GITHUB_APP_PRIVATE_KEY), + ) token = utils.find_token_from_app_inst(gh_app, installation) - return github.Github(token) + return github.Github(auth=github.Auth.Token(token)) def is_adding_testcase_to_issue_disabled(self): """