Skip to content

Commit

Permalink
Update contributors-data.js
Browse files Browse the repository at this point in the history
Updated definitions for `oneMonthAgo` and `twoMonthsAgo`, and corrected reference to "one month ago" in comment at function `notifyInactiveMembers`
  • Loading branch information
t-will-gillis authored Aug 25, 2023
1 parent b9254a4 commit d0f4d36
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions github-actions/trigger-schedule/github-data/contributors-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ const team = 'website-write';

// Set date limits: at one month, warn contributor that they are
// inactive, and at two months remove contributor from team(s)
const today = new Date();
let oneMonthAgo = new Date(today.setMonth(today.getMonth() - 1)); // 1 month from today
let twoMonthsAgo = new Date(today.setMonth(today.getMonth() - 1)); // 1 month behind oneMonthAgo
let oneMonthAgo = new Date(); // oneMonthAgo instantiated with date of "today"
oneMonthAgo.setMonth(oneMonthAgo.getMonth() - 1); // then set oneMonthAgo from "today"
oneMonthAgo = oneMonthAgo.toISOString();
let twoMonthsAgo = new Date(); // twoMonthsAgo instantiated with date of "today"
twoMonthsAgo.setMonth(twoMonthsAgo.getMonth() - 2); // then set twoMonthsAgo from "today"
twoMonthsAgo = twoMonthsAgo.toISOString();



/**
* Main function, immediately invoked
*/
Expand Down Expand Up @@ -226,7 +226,7 @@ async function toRemove(member){


/**
* Function to return list of contributors that have been inactive since twoMonthsAgo
* Function to return list of contributors that have been inactive since oneMonthAgo
* @param {Object} teamMembers [List of team members]
* @param {Object} recentContributors [List of active contributors]
* @return {Array} [removed members]
Expand Down

0 comments on commit d0f4d36

Please sign in to comment.