Skip to content

Commit cf42495

Browse files
committed
Update PyGithub auth
1 parent 1d05e91 commit cf42495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/ckan_merge_pr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from click import command, option, argument
2020
from git import Repo, Remote, RemoteReference
2121
from git.objects import Commit
22-
from github import Github
22+
from github import Github, Auth
2323
from github.PullRequest import PullRequest
2424

2525
class CkanRepo(Repo):
@@ -183,7 +183,7 @@ def merge_into(self, repo: CkanRepo, self_review: bool) -> bool:
183183
def merge_pr(repo_path: str, token: str, self_review: bool, pr_num: int) -> None:
184184
"""Main driver; gets the repo and PR and attempts the merge"""
185185
ckr = CkanRepo(repo_path)
186-
ckpr = CkanPullRequest(Github(token).get_repo('KSP-CKAN/CKAN').get_pull(pr_num))
186+
ckpr = CkanPullRequest(Github(auth=Auth.Token(token)).get_repo('KSP-CKAN/CKAN').get_pull(pr_num))
187187
sys.exit(ExitStatus.success
188188
if ckpr.merge_into(ckr, self_review)
189189
else ExitStatus.failure)

0 commit comments

Comments
 (0)