File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
22
import { maxLength } from '@commitlint/ensure';
23
23
import { default as conventionalConfig } from '@commitlint/config-conventional';
24
24
import { execSync } from 'child_process';
25
- import toLines from '@commitlint/to-lines';
26
-
25
+ import toLines from '@commitlint/to-lines';
26
+
27
27
const headerMaxLength = 70;
28
28
29
29
const validateHeaderMaxLengthIgnoringDeps = (parsedCommit) => {
35
35
\`header must not be longer than \${headerMaxLength}\`,
36
36
];
37
37
}
38
-
38
+
39
39
const validateRisk = process.env.GITHUB_REPOSITORY?.match(/gooddata\/(gdc-nas|gdc-ui|gooddata-ui-sdk|gdc-panther)/)
40
40
41
41
export default {
51
51
try {
52
52
const trailers = execSync('git interpret-trailers', ['--parse'], {
53
53
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
56
56
return [
57
57
matches === 1,
58
58
`Should have exactly one risk label of value nonprod|low|high, but ${matches} found.`,
You can’t perform that action at this time.
0 commit comments