From d4638ef0e0a0e710e64a131496debf5024d3cf00 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Mon, 12 May 2025 19:21:56 +0530 Subject: [PATCH 1/2] fix: include region in Slack message header --- sanity-report.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sanity-report.mjs b/sanity-report.mjs index 5732fc77..ee4efcc5 100644 --- a/sanity-report.mjs +++ b/sanity-report.mjs @@ -25,8 +25,16 @@ console.log(`Failed Tests: ${failedTests}`) console.log(`Pending Tests: ${pendingTests}`) console.log(`Total Duration: ${durationInMinutes}m ${durationInSeconds.toFixed(2)}s`) +const host = process.env.HOST || '' +let region = 'UNKNOWN REGION' + +const match = host.match(/^([^-]+(?:-[^-]+)*)-api/) +if (match && match[1]) { + region = match[1].toUpperCase() +} + const slackMessage = ` -*JavaScript CMA Report* +*JavaScript CMA Report - ${region}* • Total Suites: *${totalSuites}* • Total Tests: *${totalTests}* • Passed Tests: *${passedTests}* From 203f4a2ac40daebe8cb12dc8251c6449e2a13396 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Thu, 15 May 2025 15:44:01 +0530 Subject: [PATCH 2/2] fix: update default region value from 'UNKNOWN REGION' to 'NA' --- sanity-report.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sanity-report.mjs b/sanity-report.mjs index ee4efcc5..cdc2b073 100644 --- a/sanity-report.mjs +++ b/sanity-report.mjs @@ -26,7 +26,7 @@ console.log(`Pending Tests: ${pendingTests}`) console.log(`Total Duration: ${durationInMinutes}m ${durationInSeconds.toFixed(2)}s`) const host = process.env.HOST || '' -let region = 'UNKNOWN REGION' +let region = 'NA' const match = host.match(/^([^-]+(?:-[^-]+)*)-api/) if (match && match[1]) {