From e889ac372d8b1752e20198e64a98dfae0f3bdafc Mon Sep 17 00:00:00 2001 From: Will Gillis <40799239+t-will-gillis@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:04:27 -0700 Subject: [PATCH] Update get-contributors-data.js Added third main update to consider comments if the `created_at` date is recent (in order to avoid a minimizing of a comment being considered as an update) --- .../list-inactive-members/get-contributors-data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github-actions/trigger-schedule/list-inactive-members/get-contributors-data.js b/github-actions/trigger-schedule/list-inactive-members/get-contributors-data.js index d3abf43cc7..0c8551563d 100644 --- a/github-actions/trigger-schedule/list-inactive-members/get-contributors-data.js +++ b/github-actions/trigger-schedule/list-inactive-members/get-contributors-data.js @@ -105,8 +105,8 @@ async function fetchContributors(dates){ if(contributorInfo.author){ allContributorsSince[contributorInfo.author.login] = true; } - // Check for username in `user.login`, but skip `user.login` covered by 3rd API - else if(contributorInfo.user && api != 'GET /repos/{owner}/{repo}/issues'){ + // Check for username in `user.login`, check only comment's `created_at` time, and skip `user.login` covered by 3rd API + else if(contributorInfo.user && contributorInfo.created_at > date && api != 'GET /repos/{owner}/{repo}/issues'){ allContributorsSince[contributorInfo.user.login] = true; } // This check is done for `/issues` (3rd) API. Sometimes a user who created an issue is not the same as the