Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-01-14 09:22:42 +0300
committerGitHub <noreply@github.com>2022-01-14 09:22:42 +0300
commit426df1b836432bb6c4dd2beb127d40d804db7aeb (patch)
treebd5c0a051f8f87f737229894efcbbe07ec4d11a8 /tools
parent79e07a42f90a18c3694e8dc88c98d4b1c7813dfa (diff)
tools: fix small not-quite-a-bug in find-inactive-tsc.mjs
The current code attempts to count votes from people who were not members at the start of the 3 month period, resulting in `NaN` being tallied for their votes. PR-URL: https://github.com/nodejs/node/pull/41469 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Tierney Cyren <hello@bnb.im>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/find-inactive-tsc.mjs4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs
index 362e2ee2939..5c4c3703898 100755
--- a/tools/find-inactive-tsc.mjs
+++ b/tools/find-inactive-tsc.mjs
@@ -118,7 +118,9 @@ async function getVotingRecords(tscMembers, votes) {
await fs.promises.readFile(path.join('.tmp', vote), 'utf8')
);
for (const member in voteData.votes) {
- votingRecords[member]++;
+ if (tscMembers.includes(member)) {
+ votingRecords[member]++;
+ }
}
}
return votingRecords;