Skip to content

Commit 5129b7c

Browse files
Trotttargos
authored andcommitted
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: #41469 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Tierney Cyren <[email protected]>
1 parent 7ac126b commit 5129b7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/find-inactive-tsc.mjs

+3-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ async function getVotingRecords(tscMembers, votes) {
118118
await fs.promises.readFile(path.join('.tmp', vote), 'utf8')
119119
);
120120
for (const member in voteData.votes) {
121-
votingRecords[member]++;
121+
if (tscMembers.includes(member)) {
122+
votingRecords[member]++;
123+
}
122124
}
123125
}
124126
return votingRecords;

0 commit comments

Comments
 (0)