Skip to content

Commit 211c4cf

Browse files
committed
docs(import[gitlab]) Fix misleading pagination metadata comment
why: The comment "Capture pagination metadata from first page" was misleading because x-next-page is updated on every page, not just the first. Only x-total is captured from the first response. what: - Change comment to "Capture x-total from first response" at both locations (_fetch_search and _paginate_repos)
1 parent 3672775 commit 211c4cf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vcspull/_internal/remotes/gitlab.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def _fetch_search(self, options: ImportOptions) -> t.Iterator[RemoteRepo]:
213213

214214
self._log_rate_limit(headers)
215215

216-
# Capture pagination metadata from first page
216+
# Capture x-total from first response
217217
if page == 1:
218218
x_total = headers.get("x-total")
219219
if x_total is not None:
@@ -296,7 +296,7 @@ def _paginate_repos(
296296

297297
self._log_rate_limit(headers)
298298

299-
# Capture pagination metadata from first page
299+
# Capture x-total from first response
300300
if page == 1:
301301
x_total = headers.get("x-total")
302302
if x_total is not None:

0 commit comments

Comments
 (0)