From cbc8e308a5e6a03f52f29be2bfb9e92a1cb92b1b Mon Sep 17 00:00:00 2001 From: AayushSaini101 Date: Wed, 24 Jul 2024 19:09:53 +0530 Subject: [PATCH] Update --- .github/scripts/vote_tracker.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/scripts/vote_tracker.js b/.github/scripts/vote_tracker.js index cebf944ea..6313ddd4c 100644 --- a/.github/scripts/vote_tracker.js +++ b/.github/scripts/vote_tracker.js @@ -234,14 +234,13 @@ module.exports = async ({ context }) => { if (updatedTSCMembers.length > 0) { try { - const combinedData = [...voteDetails, ...updatedTSCMembers]; - await writeFile(voteTrackingFile, JSON.stringify(combinedData, null, 2)); - updatedVoteDetails = [...combinedData] + updatedVoteDetails.concat(...updatedTSCMembers) + await writeFile(voteTrackingFile, JSON.stringify(updatedVoteDetails, null, 2)); } catch (writeError) { console.error('Error wile writing file:' ,writeError) } } - return combinedData + return updatedVoteDetails } } catch (error) { console.error('Error while running the vote_tracker workflow:', error);