Skip to content

Commit

Permalink
Merge pull request #8 from gooddata/jimi/lint
Browse files Browse the repository at this point in the history
fix(commit-lint): call git properly and escape msg
  • Loading branch information
ivanmjartan authored Jun 17, 2024
2 parents f10a359 + 59c6090 commit 8a1828b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/commit-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 8a1828b

Please sign in to comment.