Skip to content

Commit

Permalink
Start using the new GitHub Auth parameters introduced in PyGithub==1.…
Browse files Browse the repository at this point in the history
…59.0
  • Loading branch information
atodorov committed May 5, 2024
1 parent c0e0d73 commit 5827074
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tcms_github_app/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit 5827074

Please sign in to comment.