-
Notifications
You must be signed in to change notification settings - Fork 25
/
.cz-config.js
77 lines (63 loc) · 1.84 KB
/
.cz-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const formatedMessage = str => str.trim();
const types = [
` feat: A new feature`,
` fix: A bug fix`,
` docs: Documentation only changes`,
` style: Changes that do not affect the meaning of the code
(white-space, formatting, missing semi-colons, etc)`,
` refactor: A code change that neither fixes a bug nor adds a feature`,
` perf: A code change that improves performance`,
` test: Adding missing tests`,
` chore: Changes to the build process or auxiliary tools
and libraries such as documentation generation`,
];
const messages = {
type:
`Select the type of change that you're committing:`,
scope:
`The package affected by your change:`,
subject:
`Write a SHORT, IMPERATIVE tense description of the change:\n`,
body:
`Provide a LONGER description of the change (optional). Use "|" to break new line:\n`,
breaking:
`Describe any BREAKING CHANGES (optional):\n`,
footer:
` List any RELATED ISSUES to this change (optional).
Foreman issues should be listed as: refs #number
foreman-js issues in github shuold be listed as fixes #GH-number
E.g.: refs #123, refs #321, fixes #GH-34, fixes #GH-35
ISSUES: `.trimStart(),
confirmCommit:
`Are you sure you want to proceed with the commit above?`,
};
const scopes = [
'root',
'builder',
'eslint-plugin-foreman',
'eslint-plugin-rules',
'test',
'vendor',
'vendor-dev',
'vendor-core',
'find-foreman',
// deps and deps-dev are only allowed for dependbot PRs
'deps',
'deps-dev',
];
module.exports = {
types: types.map(type => ({
value: type.split(':')[0].trim(),
name: type,
})),
scopes: scopes.map(scope => ({
name: scope,
})),
messages,
subjectLimit: 65,
allowCustomScopes: false,
allowTicketNumber: false,
allowBreakingChanges: ['feat', 'fix'],
breakingPrefix: 'BREAKING CHANGE:',
footerPrefix : 'ISSUES:',
};