From dcb2fba2702a6a853307972079c30c98f168d3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=B8vring?= Date: Thu, 25 Jul 2024 13:25:58 +0200 Subject: [PATCH] Improves naming --- .../domain/FilteringGitHubRepositoryDataSource.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features/projects/domain/FilteringGitHubRepositoryDataSource.ts b/src/features/projects/domain/FilteringGitHubRepositoryDataSource.ts index e4018b3b..647770c6 100644 --- a/src/features/projects/domain/FilteringGitHubRepositoryDataSource.ts +++ b/src/features/projects/domain/FilteringGitHubRepositoryDataSource.ts @@ -5,23 +5,23 @@ import { splitOwnerAndRepository } from "@/common" export default class FilteringGitHubRepositoryDataSource implements IGitHubRepositoryDataSource { private readonly dataSource: IGitHubRepositoryDataSource - private readonly hiddenRepositories: string[] + private readonly rawHiddenRepositories: string[] constructor(config: { dataSource: IGitHubRepositoryDataSource, hiddenRepositories: string[] }) { this.dataSource = config.dataSource - this.hiddenRepositories = config.hiddenRepositories + this.rawHiddenRepositories = config.hiddenRepositories } async getRepositories(): Promise { const repositories = await this.dataSource.getRepositories() - const hiddenOwnerAndRepoNameList = this.hiddenRepositories + const hiddenRepositories = this.rawHiddenRepositories .map(splitOwnerAndRepository) .filter(e => e !== undefined) return repositories.filter(repository => { - const hiddenMatch = hiddenOwnerAndRepoNameList.find(e => + const hiddenMatch = hiddenRepositories.find(e => e.owner == repository.owner && e.repository == repository.name ) return hiddenMatch === undefined