@@ -185,53 +185,6 @@ def _get_response_rest(self, url: str) -> list[dict[str, Any]]:
185
185
186
186
return results
187
187
188
- # def return_response(self) -> list[dict[str, object]]:
189
- # """TODO: delete this one all works
190
- # Make a GET request to the Github API endpoint
191
- # Deserialize json response to list of dicts.
192
-
193
- # Handles pagination as github has a REST api 100 request max.
194
-
195
- # Returns
196
- # -------
197
- # list
198
- # List of dict items each containing a review issue
199
- # """
200
-
201
- # results = []
202
- # # This is computed as a property. Reassign here to support pagination
203
- # # and new urls for each page
204
- # api_endpoint_url = self.api_endpoint
205
- # try:
206
- # while True:
207
- # response = requests.get(
208
- # api_endpoint_url,
209
- # headers={"Authorization": f"token {self.get_token()}"},
210
- # )
211
- # response.raise_for_status()
212
- # results.extend(response.json())
213
-
214
- # # Check if there are more pages to fetch
215
- # if "next" in response.links:
216
- # next_url = response.links["next"]["url"]
217
- # api_endpoint_url = next_url
218
- # else:
219
- # break
220
-
221
- # # Handle rate limiting
222
- # self.handle_rate_limit(response)
223
-
224
- # except requests.HTTPError as exception:
225
- # if exception.response.status_code == 401:
226
- # print(
227
- # "Oops - your request isn't authorized. Your token may be "
228
- # "expired or invalid. Please refresh your token."
229
- # )
230
- # else:
231
- # raise exception
232
-
233
- # return results
234
-
235
188
def get_gh_metrics (
236
189
self ,
237
190
endpoints : dict [dict [str , str ]],
0 commit comments