From ae7fb19986788108bbc6d016f7dc0da998e6d0dd Mon Sep 17 00:00:00 2001 From: Peter Jausovec Date: Fri, 24 Feb 2023 08:01:42 -0800 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..68fa9708 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,