Adds token to GH actions for GetTwitchDownloader

This commit is contained in:
Isaac Abadi
2023-05-07 00:51:21 -04:00
parent d90434c240
commit a4ca1abb7c
3 changed files with 7 additions and 1 deletions

View File

@@ -26,7 +26,8 @@ def getZipName():
def getLatestFileInRepo(repo, search_string):
# Create an unauthenticated instance of the Github object
g = Github(os.environ.get('GH_TOKEN'))
gh_token = os.environ.get('GH_TOKEN')
g = Github(gh_token if gh_token else None) # ensure it's none if it's falsy
# Replace with the repository owner and name
repo = g.get_repo(repo)