Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Sets MAX_RESULTS_LIMIT to 1000 when RepositoryStream.path is /search/repositories only #253

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions tap_github/repository_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
class RepositoryStream(GitHubRestStream):
"""Defines 'Repository' stream."""

# Search API max: 1,000 total.
MAX_RESULTS_LIMIT = 1000

name = "repositories"
# updated_at will be updated any time the repository object is updated,
# e.g. when the description or the primary language of the repository is updated.
Expand All @@ -48,6 +45,8 @@ def path(self) -> str: # type: ignore
"""Return the API endpoint path. Path options are mutually exclusive."""

if "searches" in self.config:
# Search API max: 1,000 total.
self.MAX_RESULTS_LIMIT = 1000
return "/search/repositories"
if "repositories" in self.config:
# the `repo` and `org` args will be parsed from the partition's `context`
Expand Down
Loading