From 59e8b0e2e034516530eb1597948b72848c2814c7 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Fri, 26 Apr 2024 14:03:00 -0700 Subject: [PATCH] only active urls should be considered for list_active_git_urls --- ee/tabby-webserver/src/service/github_repository.rs | 5 ++++- ee/tabby-webserver/src/service/gitlab_repository.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ee/tabby-webserver/src/service/github_repository.rs b/ee/tabby-webserver/src/service/github_repository.rs index 4888757e6167..104d3b1fdc85 100644 --- a/ee/tabby-webserver/src/service/github_repository.rs +++ b/ee/tabby-webserver/src/service/github_repository.rs @@ -142,7 +142,10 @@ impl GithubRepositoryService for GithubRepositoryProviderServiceImpl { let mut repos = self .list_repositories(vec![], None, None, None, None) - .await?; + .await? + .into_iter() + .filter(|x| x.active) + .collect(); deduplicate_github_repositories(&mut repos); diff --git a/ee/tabby-webserver/src/service/gitlab_repository.rs b/ee/tabby-webserver/src/service/gitlab_repository.rs index 9c134988c7a9..dcf1a9cbc22c 100644 --- a/ee/tabby-webserver/src/service/gitlab_repository.rs +++ b/ee/tabby-webserver/src/service/gitlab_repository.rs @@ -142,7 +142,10 @@ impl GitlabRepositoryService for GitlabRepositoryProviderServiceImpl { let mut repos = self .list_repositories(vec![], None, None, None, None) - .await?; + .await? + .into_iter() + .filter(|x| x.active) + .collect(); deduplicate_gitlab_repositories(&mut repos);