-
Notifications
You must be signed in to change notification settings - Fork 24
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
Data/op reviewer info export #5049
Conversation
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.
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 suggestion.
Comments skipped due to low confidence (1)
scripts/optimism/getProposalReviewerStats.ts:113
- The variable name 'intakeStap' is a typo. It should be renamed to 'intakeStep'.
let intakeStap: ProposalStep | undefined;
@@ -0,0 +1,8 @@ | |||
export default { | |||
// Teardown function after all tests run |
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.
remove comment
|
||
export function getUniqueWeeksCount(events: Date[]): number { | ||
// Helper function to calculate the ISO week number | ||
function getWeekNumber(date: Date): number { |
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.
Strongly prefer we do not write/maintain our own date logic and use libs instead. This code is extremely hard to follow
You should be able to just do DateTime.fromJSDate(date).weekYear
https://moment.github.io/luxon/api-docs/index.html#datetimeweeknumber
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.
Would be better if you used a date library instead of AI to do date math (I'm assuming that method was generated :). I think I wouldn't even point it out if it was part of the single-use script, but when it lives in the utils package it means it can be used anywhere, and we should always default to using luxon in our production code
…ata/op-reviewer-info-export
…ata/op-reviewer-info-export
WHAT
WHY