Skip to content

Commit 642b370

Browse files
committed
GitHubおよびGitLabクライアントのページング処理を改善し、不要な条件を削除
1 parent 3925f2d commit 642b370

3 files changed

Lines changed: 2 additions & 7 deletions

File tree

clients/github_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,10 @@ def _fetch_search_results(
564564
if isinstance(total_count, int) and total_count <= len(aggregated):
565565
break
566566

567-
if len(page_items) < per_page:
567+
if data.get("incomplete_results") is True:
568568
break
569569

570-
if data.get("incomplete_results") is True:
570+
if not isinstance(total_count, int) and len(page_items) < per_page:
571571
break
572572

573573
current_page += 1

clients/gitlab_client.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@ def _fetch_paginated_list(
238238
page = next_page
239239
continue
240240

241-
if len(page_items) < per_page:
242-
break
243-
244241
page += 1
245242

246243
return items

handlers/task_getter_gitlab.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ def _fetch_issue_discussions(self, *, per_page: int = 100, max_pages: int = 200)
224224

225225
next_page = self._determine_next_page(response, page)
226226
if next_page is None:
227-
if len(discussions) < per_page:
228-
break
229227
page += 1
230228
continue
231229
if next_page <= page:

0 commit comments

Comments
 (0)