Skip to content

Commit

Permalink
Fixing scraper-dry-run failing (Genrate markdown files)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgparmar14 committed Jun 24, 2024
1 parent 8c62674 commit 0e807d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ 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 -- ##
Expand Down
5 changes: 3 additions & 2 deletions scripts/generateNewContributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
});

Expand All @@ -43,6 +43,7 @@ function main() {
}

let newContributors = getNewContributors();
console.log(newContributors);

newContributors.forEach(async (value) => {
// fetch the user data from the github api
Expand Down

0 comments on commit 0e807d8

Please sign in to comment.