From 252b8efe6a086369039d0909c7fb661a610cf22b Mon Sep 17 00:00:00 2001 From: Gabriel Schowe Date: Wed, 18 Sep 2024 23:26:35 +0200 Subject: [PATCH] Change: Change package_versions back to old version --- pontos/github/api/packages.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pontos/github/api/packages.py b/pontos/github/api/packages.py index a270ec9e6..4ab3d0b5a 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 - ): + )SyncIterator[PackageVersion]: """ Get information about package versions @@ -146,8 +146,11 @@ async def package_versions( print(package) """ api = f"/orgs/{organization}/packages/{package_type}/{package_name}/versions" - package_versions = self._client.get_all(api) - return package_versions + async for response in self._client.get_all(api): + response.raise_for_status() + + for version in response.json(): + yield PackageVersion.from_dict(version) async def package_version( self,