From 81020d50620fd1d8779dabadca0937eb7db37d58 Mon Sep 17 00:00:00 2001 From: Matthew Gaughan Date: Wed, 8 Nov 2023 13:36:09 -0600 Subject: [PATCH] fix to gha req issue --- github_api_req.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/github_api_req.py b/github_api_req.py index 738cac5..7c8737a 100644 --- a/github_api_req.py +++ b/github_api_req.py @@ -22,8 +22,12 @@ def get_milestone_information(repo_uri): print(repo_uri_list) api_url = "https://api.github.com/repos/" + repo_uri_list[-2] + "/" + repo_uri_list[-1] + "/milestones" headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8', 'Authorization': 'bearer ' + key} - response = requests.get(url = api_url, headers=headers) - response_dict = response.json() + try: + response = requests.get(url = api_url, headers=headers) + response_dict = response.json() + except: + print('error with the gha request') + response_dict = {} return response_dict def parse_milestones(milestones, earliest_date):