From 59c609097092296b17e5ae451ccb09aad48fbb1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Mikul=C3=A1=C5=A1ek?= Date: Mon, 17 Jun 2024 13:31:59 +0200 Subject: [PATCH] fix(commit-lint): call git properly and escape msg JIRA: STL-550 --- .github/workflows/commit-lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/commit-lint.yaml b/.github/workflows/commit-lint.yaml index b6812a1..a8dcba0 100644 --- a/.github/workflows/commit-lint.yaml +++ b/.github/workflows/commit-lint.yaml @@ -49,13 +49,13 @@ jobs: if (type === 'chore' && subject?.startsWith('update')) return [true]; // skip renovate and extimage bumps try { - const trailers = execSync('git interpret-trailers', ['--parse'], { + const trailers = execSync('git interpret-trailers --parse', { input: parsedCommit.raw || '', }).toString(); const matches = toLines(trailers)?.filter((ln) => ln.match(/^risk:\s*(nonprod|low|high)/i))?.length; return [ matches === 1, - `Should have exactly one risk label of value nonprod|low|high, but ${matches} found.`, + \`Should have exactly one risk label of value nonprod|low|high, but \${matches} found.\`, ]; } catch (err) { console.error(err.toString());