From 1ef3a802d8d1c4722b6fc6bd31501587dd9dafc2 Mon Sep 17 00:00:00 2001 From: Avinesh Tripathi <73980067+AvineshTripathi@users.noreply.github.com> Date: Wed, 15 Nov 2023 20:46:50 +0530 Subject: [PATCH] Update processPRs.js --- analyze/processPRs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/analyze/processPRs.js b/analyze/processPRs.js index e3db120..2a3a568 100644 --- a/analyze/processPRs.js +++ b/analyze/processPRs.js @@ -16,9 +16,15 @@ async function processPRs() { const fileContent = fs.readFileSync('author.json', 'utf8'); if (fileContent.trim() !== '') { authorData = JSON.parse(fileContent); + } else { + console.log('author.json is empty or contains only whitespace.'); } + } else { + console.log('author.json does not exist.'); } + console.log('Existing author data:', authorData); + // Fetch merged PRs in the last week const { data: mergedPRs } = await octokit.pulls.list({ owner: 'AvineshTripathi',