diff --git a/pontos/github/api/packages.py b/pontos/github/api/packages.py index a4fd90e36..58ddb83fb 100644 --- a/pontos/github/api/packages.py +++ b/pontos/github/api/packages.py @@ -115,7 +115,7 @@ async def package( async def package_versions( self, organization: str, package_type: PackageType, package_name: str - ) -> AsyncIterator[PackageVersion]: + ): """ Get information about package versions @@ -146,11 +146,8 @@ async def package_versions( print(package) """ api = f"/orgs/{organization}/packages/{package_type}/{package_name}/versions" - async for response in self._client.get_all(api): - response.raise_for_status() - - for version in response.json(): - yield PackageVersion.from_dict(version) + package_versions = self._client.get_all(api) + return package_versions async def package_version( self,