-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Create use thresholds hook and use correct thresholds for reject origin #4588
Conversation
# Conflicts: # packages/page-bounties/src/BountyActions/ProposeCuratorAction.tsx
I think it looks fine as-is with the use. However need to just be awake and go through line-by-line where used and compare to the originals to ensure the logic still matches where used. Will get to it this weekend. |
} | ||
|
||
export function getAtLeastThresholdMembersCount (membersCount: number, thresholdRatio: number): number { | ||
return Math.ceil(membersCount * thresholdRatio); |
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.
shall we add if (membersCount === 0) { return 0; }
here, as it's done above?
}; | ||
export interface Threshold { | ||
value: number; | ||
option: 'AtLeast' | 'MoreThan'; |
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.
does it make sense to create an enum for these options? for simplifying further maintaining and exclude typos
Closing. Will pull in relevant ideas into #6924 The linked PR in itself also needs to get up-to-date with master. It may actually just get "some" fixes and not be fully completed since the ecosystem is moving to the gov 2 model with less reliance on these configs. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
No description provided.