1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { getGithubTeamCommitHistories } from "https://esm.town/v/onemanwenttomow/getGithubTeamCommitHistories";
import { getGithubUsersByTeam } from "https://esm.town/v/onemanwenttomow/getGithubUsersByTeam";
export const getCohortRecentCommits = async (cohort) => {
const teamMembers = await getGithubUsersByTeam(
cohort,
);
const memberCommits = await getGithubTeamCommitHistories(teamMembers);
return {
studentsNotCommitingLast7Days: memberCommits.filter((member) =>
!member.commitsLast7Days
).map((member) => `https://github.com/${member.username}`),
studentsNotCommitingLast3Days: memberCommits.filter((member) =>
!member.commitsLast3Days
).map((member) => `https://github.com/${member.username}`),
team: memberCommits,
};
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023