Repository navigation
refactor(forge): share pagination as a function and keep RestClient for GitHub and Gitea - #1289
Merged
Merged
Conversation
…or GitHub and Gitea
BryanFRD
enabled auto-merge (squash)
October 6, 2026 07:36
Contributor
There was a problem hiding this comment.
The pagination behaviour hasn't changed. paginate uses the same loop, early exits and MAX_PAGES cap as before. GitLab still sends per_page=100 with the token header and User-Agent it had through RestClient::gitlab. That client also built a repo_url the pagination path never read, so removing it loses nothing. The inline request builder in gitlab.rs matches how the rest of that file talks to the API. Nothing blocking.
ferrflow Bot
added a commit
that referenced
this pull request
Oct 6, 2026
## [7.28.4] - 2026-10-06 ### Refactoring - refactor(forge): share pagination as a function and keep RestClient for GitHub and Gitea (#1289)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1288
Follow-up to the review of #1287. GitLab used
RestClient::gitlabonly to paginate: the project URL it built was never read, and the client handed GitLab release and comment calls shaped for GitHub and Gitea (/issues/..., abodyfield) that would hit the wrong endpoints if ever called.The pagination loop is now a free
paginatefunction taking a request builder, the page-size parameter, the page size and a label.RestClient::paginated_json_arraycalls it for GitHub and Gitea, and GitLab calls it directly with its own token header.RestClient::gitlabis gone, soRestClientonly exists for the two forges it fits.No behaviour change: same URLs, headers and page sizes. Forge tests pass (186), including GitLab's fake-server tests.