-
-
Notifications
You must be signed in to change notification settings - Fork 162
fix(vote-tracker): remove former TSC members from voteTrackingFile an… #2134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(vote-tracker): remove former TSC members from voteTrackingFile an… #2134
Conversation
…d normalize new members
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome to AsyncAPI. Thanks a lot for creating your first pull request. Please check out our contributors guide useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
WalkthroughVote tracking script refactored to normalize and augment vote data, merge newly discovered TSC members, and filter entries against current membership. Data transformations include type coercion for counts and timestamps, boolean conversion for participation flags, and default value assignments. Vote details written in single operation after processing. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (typeof e.isVotedInLast3Months !== "boolean") { | ||
| e.isVotedInLast3Months = Boolean(e.isVotedInLast3Months); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix boolean coercion for legacy string values.
Boolean(e.isVotedInLast3Months) flips any non-empty string—including "false", "no", or "0"—to true, which marks inactive members as active voters and corrupts the participation stats you’re trying to normalize. Please normalize string inputs explicitly before coercing.
- if (typeof e.isVotedInLast3Months !== "boolean") {
- e.isVotedInLast3Months = Boolean(e.isVotedInLast3Months);
- }
+ if (typeof e.isVotedInLast3Months !== "boolean") {
+ const normalized = String(e.isVotedInLast3Months).trim().toLowerCase();
+ e.isVotedInLast3Months = !["", "false", "0", "no", "off"].includes(normalized);
+ }📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if (typeof e.isVotedInLast3Months !== "boolean") { | |
| e.isVotedInLast3Months = Boolean(e.isVotedInLast3Months); | |
| } | |
| if (typeof e.isVotedInLast3Months !== "boolean") { | |
| const normalized = String(e.isVotedInLast3Months).trim().toLowerCase(); | |
| e.isVotedInLast3Months = !["", "false", "0", "no", "off"].includes(normalized); | |
| } |
🤖 Prompt for AI Agents
In .github/scripts/vote_tracker/index.js around lines 264-266, the code uses
Boolean(e.isVotedInLast3Months) which treats any non-empty string (including
"false", "no", "0") as true; replace this with explicit normalization: if the
value is already a boolean leave it, if it's a string trim and toLowerCase() and
return true only for accepted truthy strings like "true", "1", "yes" (and false
for "false", "0", "no" or unknown), and also handle numeric 1/0 by mapping 1 ->
true and 0 -> false; set e.isVotedInLast3Months to the normalized boolean.
|
I don't see the issue that is related to this PR ? |
"I've opened a PR that fixes the voting overview bug by removing former TSC members from the tracking file and normalizing newly added members: . Please review when convenient; happy to adjust to archive removed members instead of deleting them."
Summary by CodeRabbit
Bug Fixes
Improvements