Skip to main content

Module pagination

Module pagination 

Source
Expand description

Generic paginated-fetch loop for a git-tags-shaped REST API returning per_page=100 pages.

Extracted from crate::github::paginate_tags so a second provider (GitLab CI’s /repository/tags and /releases endpoints) can share the exact concurrency/ordering/error-mapping behavior instead of forking it. crate::github::paginate_tags is now a thin delegation to paginate_pages.

Functions§

page_has_more
Returns true when a fetched page came back full (per_page=100 entries), meaning a subsequent page may exist and should be fetched too. A page with fewer entries is necessarily the last one.
paginate_pages
Drives a paginated-fetch loop against a per_page=100-shaped REST endpoint: page 1 alone, then subsequent pages in batches of up to CONCURRENCY pages.
warn_if_pagination_truncated
Logs a warning when pagination for name stops at max_pages while provider still had more pages available (page_has_more(page_len)).