From d3d0a7f98ff7c5cb4170b01a3440479ce188cba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Rame=CC=81?= Date: Wed, 21 Feb 2024 00:28:09 +0100 Subject: [PATCH] chore: remove dataset filters for production --- src/features/domain.ts | 4 ++-- src/features/repository.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/features/domain.ts b/src/features/domain.ts index 0bf1048..150d589 100644 --- a/src/features/domain.ts +++ b/src/features/domain.ts @@ -94,8 +94,8 @@ export async function formatDomainsIntoDatabase() { return CsvDomainSchema.parse(record); }) .filter((csvDomain: CsvDomainSchemaType) => { - // TODO: to remove due to tests on a small subset - if (!csvDomain.name.includes('.beta.gouv.fr')) { + // In development environment we reduce the dataset to analyze + if (process.env.APP_MODE === 'dev' && !csvDomain.name.includes('.beta.gouv.fr')) { return false; } diff --git a/src/features/repository.ts b/src/features/repository.ts index a2fed40..7210eb2 100644 --- a/src/features/repository.ts +++ b/src/features/repository.ts @@ -76,8 +76,8 @@ export async function formatRepositoriesIntoDatabase() { return JsonRepositorySchema.parse(record); }) .filter((jsonRepository: JsonRepositorySchemaType) => { - // TODO: to remove due to tests on a small subset - if (!jsonRepository.repository_url.includes('https://github.com/betagouv/')) { + // In development environment we reduce the dataset to analyze + if (process.env.APP_MODE === 'dev' && !jsonRepository.repository_url.includes('https://github.com/betagouv/')) { return false; }