From bf02ef28d06ad1ed9fbb83eacacbb7a03b2a8bdd Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 25 Dec 2025 15:55:14 -0800 Subject: [PATCH] Increase date tolerance in isDateMoreRecentThan to 30s --- dist/index.js | 6 +++--- src/classes/issues-processor.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 3f5b72646..3757a3c82 100644 --- a/dist/index.js +++ b/dist/index.js @@ -803,9 +803,9 @@ class IssuesProcessor { issueLogger.info(`marked stale this run, so don't check for updates`); yield this._removeLabelsOnStatusTransition(issue, labelsToRemoveWhenStale, option_1.Option.LabelsToRemoveWhenStale); } - // The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2) - // isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (15 seconds in this case) - const issueHasUpdateSinceStale = (0, is_date_more_recent_than_1.isDateMoreRecentThan)(new Date(issue.updated_at), new Date(markedStaleOn), 15); + // The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by several seconds) + // isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (30 seconds in this case) + const issueHasUpdateSinceStale = (0, is_date_more_recent_than_1.isDateMoreRecentThan)(new Date(issue.updated_at), new Date(markedStaleOn), 30); issueLogger.info(`$$type has been updated since it was marked stale: ${logger_service_1.LoggerService.cyan(issueHasUpdateSinceStale)}`); // Should we un-stale this issue? if (shouldRemoveStaleWhenUpdated && diff --git a/src/classes/issues-processor.ts b/src/classes/issues-processor.ts index 26419173d..90fde5bd4 100644 --- a/src/classes/issues-processor.ts +++ b/src/classes/issues-processor.ts @@ -742,12 +742,12 @@ export class IssuesProcessor { ); } - // The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by a second or 2) - // isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (15 seconds in this case) + // The issue.updated_at and markedStaleOn are not always exactly in sync (they can be off by several seconds) + // isDateMoreRecentThan makes sure they are not the same date within a certain tolerance (30 seconds in this case) const issueHasUpdateSinceStale = isDateMoreRecentThan( new Date(issue.updated_at), new Date(markedStaleOn), - 15 + 30 ); issueLogger.info(