You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
715 B
25 lines
715 B
'use strict'
|
|
|
|
module.exports = function (config) {
|
|
config = defaultConfig(config)
|
|
return {
|
|
headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/,
|
|
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/,
|
|
headerCorrespondence: [
|
|
'type',
|
|
'scope',
|
|
'subject'
|
|
],
|
|
noteKeywords: ['BREAKING CHANGE', 'BREAKING-CHANGE'],
|
|
revertPattern: /^(?:Revert|revert:)\s"?([\s\S]+?)"?\s*This reverts commit (\w*)\./i,
|
|
revertCorrespondence: ['header', 'hash'],
|
|
issuePrefixes: config.issuePrefixes
|
|
}
|
|
}
|
|
|
|
// merge user set configuration with default configuration.
|
|
function defaultConfig (config) {
|
|
config = config || {}
|
|
config.issuePrefixes = config.issuePrefixes || ['#']
|
|
return config
|
|
}
|
|
|