feat: make sure to run a distinct first
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-04-12 16:23:04 +02:00
parent 9cbef537c9
commit 33e6cd8a3a
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912
4 changed files with 6 additions and 3 deletions

1
Cargo.lock generated
View File

@ -319,6 +319,7 @@ dependencies = [
"clap",
"dotenv",
"futures",
"itertools",
"reqwest",
"serde",
"sqlx",

View File

@ -18,3 +18,4 @@ uuid = { version = "1.7.0", features = ["v4"] }
tower-http = { version = "0.5.2", features = ["cors", "trace"] }
futures = "0.3.30"
reqwest = {version = "0.12.3", default-features = false, features = ["json", "rustls-tls"]}
itertools = "0.12.1"

View File

@ -17,7 +17,7 @@ impl Deref for GiteaClient {
}
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Repository {
pub owner: String,
pub name: String,
@ -142,6 +142,5 @@ mod extensions;
pub mod traits;
use anyhow::Context;
use axum::http::HeaderMap;
pub use extensions::*;
use serde::Deserialize;

View File

@ -1,3 +1,5 @@
use itertools::Itertools;
use crate::SharedState;
use super::gitea::{GiteaClient, GiteaClientState, Repository};
@ -43,7 +45,7 @@ impl Reconciler {
}
}
Ok(repos)
Ok(repos.into_iter().unique().collect())
}
}