Skip to content

Commit

Permalink
Sets MAX_RESULTS_LIMIT to 1000 when path is /search/repositories only
Browse files Browse the repository at this point in the history
  • Loading branch information
merlindavies committed May 7, 2024
1 parent 3fb9e49 commit 6b0418b
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit 6b0418b

Please sign in to comment.