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):