You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a similar problem, but not with headerPattern, but with breakingHeaderPattern. We are using conventional-changelog-conventionalcommits with @semantic-release/release-notes-generator, which fortunately allows to overwrite parserOpts, but we cannot overwrite breakingHeaderPattern, because it's hardcoded here:
@pvdlg@dangreen is there any chance to make it configurable or to overwrite it somehow during runtime (I'm not the specialist in JS monkeypatching 😉)?
Why do we need it? We use semantic-release in a repo with a few packages, and we differentiate commits by package name in a scope and the last piece we need to make it work is such a configuration:
conventional-changelog/packages/conventional-changelog-conventionalcommits/src/parser.js
Line 5 in d3b8aaa
This is very annoying while I want to introduce my own pattern.
Suggested solution :
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'], ...config }
The text was updated successfully, but these errors were encountered: