From 1c51996eedc3b650173c893b7da88821fe01684f Mon Sep 17 00:00:00 2001 From: Morian Sonnet Date: Mon, 11 Sep 2023 01:03:45 +0200 Subject: [PATCH] Consider only packages with type generic --- src/providers/gitlab.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/providers/gitlab.rs b/src/providers/gitlab.rs index 430a045..715de49 100644 --- a/src/providers/gitlab.rs +++ b/src/providers/gitlab.rs @@ -204,7 +204,11 @@ impl super::PackageProvider for Gitlab { } } - let res: Vec = res.json().await?; + let res: Vec = res.json::>() + .await? + .into_iter() + .filter(|release| release.package_type == "generic") + .collect(); for release in res { let this = Arc::clone(&self); @@ -358,6 +362,7 @@ pub struct GitlabPackageResponse { pub id: u64, pub name: String, pub version: String, + pub package_type: String, #[serde(rename = "_links")] pub links: GitlabPackageLinksResponse, }