-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparser-opts.js
31 lines (25 loc) · 1.04 KB
/
parser-opts.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
'use strict'
const customConfig = require('./customConfig')
let headerPatternRegExp = /^(\w*)(?:\((.*)\))?: (.*)$/
let headerCorrespondenceList = ['type','scope','subject']
if (customConfig.headerPattern) {
headerPatternRegExp = customConfig.headerPattern
}
if (customConfig.headerCorrespondence) {
headerCorrespondenceList = customConfig.headerCorrespondence
}
// format: '%B%n-hash-%n%H%n-gitTags-%n%d%n-committerDate-%n%ci%n-authorName-%n%an%n-authorEmail-%n%ae',
module.exports = {
headerPattern: headerPatternRegExp,
headerCorrespondence: headerCorrespondenceList,
noteKeywords: ['BREAKING CHANGE'],
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
revertCorrespondence: ['header', 'hash']
}
// module.exports = {
// headerPattern: /^(\w*)(?:\((.*)\))?: (.*)$/,
// headerCorrespondence: ['type', 'scope', 'subject'],
// noteKeywords: ['BREAKING CHANGE'],
// revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
// revertCorrespondence: ['header', 'hash']
// }