Skip to content
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

adding new Contributors option. #264

Closed
wants to merge 0 commits into from
Closed

Conversation

rhithesh
Copy link
Contributor

#153 fixes.

Copy link

vercel bot commented Feb 27, 2024

@rhithesh is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

lib/types.ts Outdated
@@ -39,6 +39,7 @@ export interface Highlights {
pr_collaborated: number;
issue_assigned: number;
issue_opened: number;
newContributor?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhithesh let's store the first_activity date instead of a boolean field as that'd allow us to show "Contributing since " in contributors' profiles, and filtering can be done by doing a comparison of is within the last N days or not against this field.

lib/types.ts Outdated
@@ -39,6 +39,7 @@ export interface Highlights {
pr_collaborated: number;
issue_assigned: number;
issue_opened: number;
newContributor?: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, move this field to the "Contributor" type instead of keeping it under "Highlights", since it's specific to a contributor. Highlights are used in multiple other ways where field newContributor wouldn't be a right fit.

lib/api.ts Outdated
Comment on lines 155 to 166
return {
let a = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert unrelated changes

Comment on lines 49 to 46
} else if (sortBy == "new_contributors") {
return b.summary["points"] - a.summary["points"];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new_contributors is a boolean field, how would sort happen exactly? And why is it sorted by points here?

Sort by "date of first activity" instead

Comment on lines 42 to 45
.filter((contributor) => contributor.summary.points)
.filter((contributor) => {
return contributor.summary.points;
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert unrelated changes

@@ -32,17 +32,22 @@ export const getLeaderboardData = async (
const shouldReverse = !ordering.startsWith("-");

const contributors = await getContributors();
// console.log(contributors);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert unrelated changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants