Skip to content

Commit

Permalink
fix(preset, conventionalcommits): pass issuePrefixes to parser (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
tommywo authored and bcoe committed Aug 12, 2019
1 parent 1ed96fd commit 958d243
Showing 1 changed file with 10 additions and 1 deletion.
@@ -1,6 +1,7 @@
'use strict'

module.exports = function (config) {
config = defaultConfig(config)
return {
headerPattern: /^(\w*)(?:\((.*)\))?!?: (.*)$/,
breakingHeaderPattern: /^(\w*)(?:\((.*)\))?!: (.*)$/,
Expand All @@ -11,6 +12,14 @@ module.exports = function (config) {
],
noteKeywords: [`BREAKING CHANGE`],
revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
revertCorrespondence: [`header`, `hash`]
revertCorrespondence: [`header`, `hash`],
issuePrefixes: config.issuePrefixes
}
}

// merge user set configuration with default configuration.
function defaultConfig (config) {
config = config || {}
config.issuePrefixes = config.issuePrefixes || ['#']
return config
}

0 comments on commit 958d243

Please sign in to comment.