Skip to content

Commit

Permalink
refactor(repository): add comments to clarify repository listing logic
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Jan 17, 2025
1 parent e8faa50 commit 1274390
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ee/tabby-webserver/src/service/repository/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub fn create(
#[async_trait]
impl RepositoryService for RepositoryServiceImpl {
async fn list_all_code_repository(&self) -> Result<Vec<CodeRepository>> {
// Read repositories configured as git url.
let mut repos: Vec<CodeRepository> = self
.git
.list(None, None, None, None)
Expand All @@ -52,13 +53,15 @@ impl RepositoryService for RepositoryServiceImpl {
.map(|repo| CodeRepository::new(&repo.git_url, &repo.source_id()))
.collect();

// Read repositories configured as third party integration (e.g Github, Gitlab)
repos.extend(
self.third_party
.list_code_repositories()
.await
.unwrap_or_default(),
);

// Read repositories configured in `config.toml`
repos.extend(
self.config
.iter()
Expand Down

0 comments on commit 1274390

Please sign in to comment.