diff options
author | Rich Trott <rtrott@gmail.com> | 2022-01-14 09:22:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-14 09:22:42 +0300 |
commit | 426df1b836432bb6c4dd2beb127d40d804db7aeb (patch) | |
tree | bd5c0a051f8f87f737229894efcbbe07ec4d11a8 /tools | |
parent | 79e07a42f90a18c3694e8dc88c98d4b1c7813dfa (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-x | tools/find-inactive-tsc.mjs | 4 |
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; |