fix: migrate from get_next_page_token to get_new_paginator - #603
Open
imamAtif wants to merge 2 commits into
Open
fix: migrate from get_next_page_token to get_new_paginator#603imamAtif wants to merge 2 commits into
imamAtif wants to merge 2 commits into
Conversation
Replace deprecated RESTStream.get_next_page_token with the new paginator API. Add GitHubRestPaginator and GitHubGraphQLPaginator in client.py and update the four repository streams that had custom early-exit pagination logic to use get_new_paginator with has_more overrides. Closes MeltanoLabs#171
imamAtif
force-pushed
the
fix/pagination-migration
branch
from
August 30, 2026 13:15
afb7c3f to
9d77434
Compare
edgarrmondragon
requested changes
Aug 31, 2026
edgarrmondragon
left a comment
Member
There was a problem hiding this comment.
Thanks @imamAtif!
Just one request.
| use_cursor_pagination = False | ||
|
|
||
| _authenticator: GitHubTokenAuthenticator | None = None | ||
| def __init__(self, stream: GitHubRestStream, *args: Any, **kwargs: Any) -> None: # noqa: ANN401 |
Member
There was a problem hiding this comment.
I'd prefer that instead of passing a stream object to the constructor here, we pass the explicit parameters that we get from stream attributes. e.g. self.stream.MAX_RESULTS_LIMIT -> max_results, etc.
Wdyt?
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.
Summary
RESTStream.get_next_page_tokenwith the new paginator APIGitHubRestPaginatorandGitHubGraphQLPaginatorintap_github/client.pyStargazers,Discussions,DiscussionComments,DiscussionCommentReplies) to overrideget_new_paginatorwithhas_moreearly-exit logic instead ofget_next_page_tokenThis removes the deprecation warning:
Validation
uv run pytest -q- 71 passed, 8 deselected, 2 pre-existing core failures unrelated to this changeuv run mypy tap_github- passeduv run ty check tap_github- passeduvx ruff checkanduvx ruff format- passedCloses #171