diff --git a/aiogithubapi/repository.py b/aiogithubapi/repository.py index 7d70630..611f0e9 100644 --- a/aiogithubapi/repository.py +++ b/aiogithubapi/repository.py @@ -138,7 +138,7 @@ async def get_rendered_contents(self, path, ref=None): @backoff.on_exception( backoff.expo, (ClientError, CancelledError, TimeoutError, KeyError), max_tries=5 ) - async def get_releases(self, prerelease=False): + async def get_releases(self, prerelease=False, returnlimit=5): """Retrun a list of repository release objects.""" endpoint = "/repos/{}/releases".format(self.full_name) url = BASE_URL + endpoint @@ -160,7 +160,7 @@ async def get_releases(self, prerelease=False): contents = [] for content in response: - if len(contents) == 5: + if len(contents) == returnlimit: break if not prerelease: if content.get("prerelease", False): diff --git a/setup.py b/setup.py index ccd68f6..28532a8 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setuptools.setup( name="aiogithubapi", - version="0.4.1", + version="0.4.2", author="Joakim Sorensen (@ludeeus)", author_email="hi@ludeeus.dev", description="Python async client for the GitHub API.",