Skip to content

Commit

Permalink
tools: fix small not-quite-a-bug in find-inactive-tsc.mjs
Browse files Browse the repository at this point in the history
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: #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>
  • Loading branch information
Trott authored and targos committed Jan 14, 2022
1 parent 7ac126b commit 5129b7c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/find-inactive-tsc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5129b7c

Please sign in to comment.