-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
67 lines (65 loc) · 1.71 KB
/
index.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
const intializeCommitizen = require('cz-bespoke');
const notEmpty = text => text.length > 0 ? true : "This may not be left blank.";
module.exports = intializeCommitizen.tweak({
// By default, cz-bespoke will validate that the first line does not exceed subjectLineLength.
subjectLineLength: 50,
bodyLineLength: 70,
useEditor: {
body: true,
},
validation: {
scope: notEmpty,
body: notEmpty,
},
labels: {
issues: 'List any issues related to this change: (Ex: "Resolve #2, Progress #5")\n',
},
choices: {
type: [
{
title: 'feat',
description: 'A new feature.',
},
{
title: 'fix',
description: 'A bug fix.',
},
{
title: 'docs',
description: 'Documentation only changes.',
},
{
title: 'style',
description: 'Changes that do not affect the behavior of the code (white-space, formatting).',
},
{
title: 'refactor',
description: 'A code change that neither fixes a bug nor adds a feature.',
},
{
title: 'perf',
description: 'A code change that improves performance.',
},
{
title: 'test',
description: 'Adding missing tests or correcting existing tests.',
},
{
title: 'build',
description: 'Changes that affect the build system or external dependencies.',
},
{
title: 'ci',
description: 'Changes to our CI configuration files and scripts.',
},
{
title: 'chore',
description: 'Other changes that don\'t modify src or test files.',
},
{
title: 'revert',
description: 'Reverts a previous commit.',
}
],
},
});