diff --git a/ee/tabby-schema/src/schema/repository/mod.rs b/ee/tabby-schema/src/schema/repository/mod.rs index bfc91ef4c8e8..e6cbc021ebb8 100644 --- a/ee/tabby-schema/src/schema/repository/mod.rs +++ b/ee/tabby-schema/src/schema/repository/mod.rs @@ -279,6 +279,4 @@ pub trait RepositoryService: Send + Sync { fn third_party(&self) -> Arc; async fn list_all_code_repository(&self) -> Result>; - - async fn resolve_source_id_by_git_url(&self, git_url: &str) -> Result; } diff --git a/ee/tabby-webserver/src/service/repository/mod.rs b/ee/tabby-webserver/src/service/repository/mod.rs index 725e87bedcc2..0437e7a5b538 100644 --- a/ee/tabby-webserver/src/service/repository/mod.rs +++ b/ee/tabby-webserver/src/service/repository/mod.rs @@ -183,21 +183,6 @@ impl RepositoryService for RepositoryServiceImpl { Ok(ret) } - - async fn resolve_source_id_by_git_url(&self, git_url: &str) -> Result { - let git_url = RepositoryConfig::canonicalize_url(git_url); - - // Only third_party repositories with a git_url could generates a web source (e.g Issues, PRs) - let tp = self.third_party(); - let repos = tp - .list_repositories_with_filter(None, None, Some(true), None, None, None, None) - .await?; - repos - .iter() - .find(|r| RepositoryConfig::canonicalize_url(&r.git_url) == git_url) - .map(|r| r.source_id()) - .ok_or_else(|| anyhow::anyhow!("No web source found for git_url: {}", git_url).into()) - } } fn to_grep_file(file: tabby_git::GrepFile) -> tabby_schema::repository::GrepFile {