Allow changelog to run without a token (#1312)

* Allow code to run without a token

* Reverted submodule change by mistake
This commit is contained in:
jLynx 2023-07-27 14:53:56 +12:00 committed by GitHub
parent 37aa9c046f
commit 8c565bbf15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,7 +29,7 @@ def print_nightly_changelog():
def handle_get_request(path, offset=None):
headers = {"Authorization": f"Bearer {token}"}
headers = {} if token == None else {"Authorization": f"Bearer {token}"}
params = {"since": offset}
url_base = f"https://api.github.com/repos/{repo_owner}/{repo_name}/"
response = requests.get(url_base + path, headers=headers, params=params)