From 6e31084cc247afa531a30869c65844b867af885c Mon Sep 17 00:00:00 2001 From: dhrumit parmar Date: Mon, 24 Jun 2024 11:52:03 +0530 Subject: [PATCH] Fixing scraper-dry-run failing (Genrate markdown files) --- .env | 1 + scripts/generateNewContributors.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.env b/.env index a978ad42..04ee3981 100644 --- a/.env +++ b/.env @@ -19,6 +19,7 @@ NEXT_PUBLIC_CONTRIBUTORS_INFO="" NEXT_PUBLIC_LEADERBOARD_DEFAULT_ROLES="core,intern,contributor" ## -- Data Source -- ## +DATA_REPO = "data-repo" DATA_SOURCE="https://github.com/coronasafe/leaderboard-data.git" ## -- Slack -- ## diff --git a/scripts/generateNewContributors.js b/scripts/generateNewContributors.js index 2f31597a..4a2709be 100644 --- a/scripts/generateNewContributors.js +++ b/scripts/generateNewContributors.js @@ -22,11 +22,11 @@ const basePath = join(process.env.DATA_REPO || process.cwd()); function getNewContributors() { let newContributors = new Set(); - fs.readdirSync(join(basePath, "data-repo/data/github")).forEach((file) => { + fs.readdirSync(join(basePath, "data/github")).forEach((file) => { newContributors.add(file.split(".")[0]); }); - fs.readdirSync(join(basePath, "data-repo/contributors")).forEach((file) => { + fs.readdirSync(join(basePath, "contributors")).forEach((file) => { newContributors.delete(file.split(".")[0]); });