From 9a75fd52e8599962de61751cd1ce6c0128713f0f Mon Sep 17 00:00:00 2001 From: Peter Jausovec Date: Tue, 14 Feb 2023 13:35:31 -0600 Subject: [PATCH] add an auth token to gh api requests Signed-off-by: Peter Jausovec --- pull_external.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pull_external.py b/pull_external.py index b67b8bef..d8e5e6f9 100644 --- a/pull_external.py +++ b/pull_external.py @@ -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,