From 888973e974e09f34cff2a98e9f7ecfe781fb139f Mon Sep 17 00:00:00 2001 From: Grace Park Date: Thu, 30 Nov 2023 15:42:55 -0800 Subject: [PATCH] update ghes double digit check (#47000) Co-authored-by: Rachael Sewell --- src/rest/scripts/utils/update-markdown.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/rest/scripts/utils/update-markdown.js b/src/rest/scripts/utils/update-markdown.js index fb60200251..387d4b83bf 100644 --- a/src/rest/scripts/utils/update-markdown.js +++ b/src/rest/scripts/utils/update-markdown.js @@ -37,7 +37,14 @@ async function getDataFrontmatter(dataDirectory, schemaFilename) { // This makes the deprecation steps easier. .filter((file) => { return !deprecated.some((depVersion) => - file.split(path.sep).find((pathSplit) => pathSplit.includes(depVersion)), + file.split(path.sep).find((pathSplit) => { + if (pathSplit.startsWith('ghes')) { + // An example version format is: ghes-3.6 or ghes-3.6-2022-01-01 + const ghesVersion = pathSplit.split('-')[1] + return ghesVersion === depVersion + } + return false + }), ) })