Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/post-contribution-message.py
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -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)

Expand Down