Skip to content

Commit

Permalink
add an auth token to gh api requests
Browse files Browse the repository at this point in the history
  • Loading branch information
peterj committed Feb 14, 2023
1 parent f6e7584 commit 7d45787
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pull_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ def _pull_releases():

def _get_releases():
session = requests.Session()

token = os.environ.get("GITHUB_TOKEN")
if token is not None:
session.headers.update({"Authorization": "token {}".format(token)})

retries = Retry(
total=5,
backoff_factor=0.1,
Expand Down

0 comments on commit 7d45787

Please sign in to comment.