Skip to content

Commit 90faba1

Browse files
committed
fix(commit-lint): fix risk regex
JIRA: STL-550
1 parent 63152f4 commit 90faba1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/commit-lint.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
import { maxLength } from '@commitlint/ensure';
2323
import { default as conventionalConfig } from '@commitlint/config-conventional';
2424
import { execSync } from 'child_process';
25-
import toLines from '@commitlint/to-lines';
26-
25+
import toLines from '@commitlint/to-lines';
26+
2727
const headerMaxLength = 70;
2828
2929
const validateHeaderMaxLengthIgnoringDeps = (parsedCommit) => {
@@ -35,7 +35,7 @@ jobs:
3535
\`header must not be longer than \${headerMaxLength}\`,
3636
];
3737
}
38-
38+
3939
const validateRisk = process.env.GITHUB_REPOSITORY?.match(/gooddata\/(gdc-nas|gdc-ui|gooddata-ui-sdk|gdc-panther)/)
4040
4141
export default {
@@ -51,8 +51,8 @@ jobs:
5151
try {
5252
const trailers = execSync('git interpret-trailers', ['--parse'], {
5353
input: parsedCommit.raw || '',
54-
}).toString();
55-
const matches = toLines(trailers)?.filter((ln) => ln.match(/^risk:\s*nonprod|low|high/i))?.length
54+
}).toString();
55+
const matches = toLines(trailers)?.filter((ln) => ln.match(/^risk:\s*(nonprod|low|high)/i))?.length
5656
return [
5757
matches === 1,
5858
`Should have exactly one risk label of value nonprod|low|high, but ${matches} found.`,

0 commit comments

Comments
 (0)