From ae1804a6bb74e98146653dd659d610d12bd87deb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barbara=20Gawe=C5=82-Kucab?= Date: Tue, 28 May 2024 10:44:55 +0200 Subject: [PATCH] simplify changes --- .../actions/javascript/getGraphiteString/getGraphiteString.ts | 3 +-- workflow_tests/utils/preGenerateTest.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/actions/javascript/getGraphiteString/getGraphiteString.ts b/.github/actions/javascript/getGraphiteString/getGraphiteString.ts index 15b5e885c921..cf686b36cd3d 100644 --- a/.github/actions/javascript/getGraphiteString/getGraphiteString.ts +++ b/.github/actions/javascript/getGraphiteString/getGraphiteString.ts @@ -32,8 +32,7 @@ const run = () => { } if (current.name && current.meanDuration && current.meanCount && timestamp) { - const currentName = current.name as string; - const formattedName = currentName.split(' ').join('-'); + const formattedName = (current.name as string).split(' ').join('-'); const renderDurationString = `${GRAPHITE_PATH}.${formattedName}.renderDuration ${current.meanDuration} ${timestamp}`; const renderCountString = `${GRAPHITE_PATH}.${formattedName}.renderCount ${current.meanCount} ${timestamp}`; diff --git a/workflow_tests/utils/preGenerateTest.ts b/workflow_tests/utils/preGenerateTest.ts index eb1d2e8f9b69..e88f7ffd8ee5 100644 --- a/workflow_tests/utils/preGenerateTest.ts +++ b/workflow_tests/utils/preGenerateTest.ts @@ -219,8 +219,7 @@ const getMockFileContent = (workflowName: string, jobs: Record { - const stepName = step.name as string; - const stepMockName = `${workflowName.toUpperCase()}__${jobId.toUpperCase()}__${stepName + const stepMockName = `${workflowName.toUpperCase()}__${jobId.toUpperCase()}__${(step.name as string) .replaceAll(' ', '_') .replaceAll('-', '_') .replaceAll(',', '')