From 85dad169bb06a645663ea5318bf91ab7cd796f1b Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 22 Jan 2024 19:02:08 +0200 Subject: [PATCH] chore(docs-util): change freshness check threshold (#6122) --- docs-util/packages/scripts/freshness-check.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs-util/packages/scripts/freshness-check.ts b/docs-util/packages/scripts/freshness-check.ts index 97646d9ce9..00103f206a 100644 --- a/docs-util/packages/scripts/freshness-check.ts +++ b/docs-util/packages/scripts/freshness-check.ts @@ -73,14 +73,15 @@ async function scanDirectory(startPath: string) { commitResponse.data[0].commit.committer.date ) const monthsSinceEdited = getMonthDifference(lastEditedDate, today) + const monthsThreshold = 2 - if (monthsSinceEdited > 6) { + if (monthsSinceEdited > monthsThreshold) { //file was edited more than 6 months ago. //check if there's an issue created for this file since the commit date const existingIssue = await linearClient.issues({ filter: { createdAt: { - gte: subtractMonths(monthsSinceEdited - 6, today), + gte: subtractMonths(monthsSinceEdited - monthsThreshold, today), }, title: { containsIgnoreCase: `Freshness check for ${filePath}`,