-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Hi, currently we are able to overwrite parserOpts and writerOpts:
release-notes-generator/lib/load-changelog-config.js
Lines 35 to 39 in 354354b
| return { | |
| parserOpts: { ...loadedConfig.parser, ...parserOpts }, | |
| writerOpts: { ...loadedConfig.writer, ...writerOpts }, | |
| }; | |
| }; |
but we miss a capability to overwrite whatBump() function used by presets, e.g. conventional-changelog-conventionalcommits:
export default async function createPreset (config) {
return {
commits: {
ignore: config?.ignoreCommits,
merges: false
},
parser: createParserOpts(config),
writer: await createWriterOpts(config),
whatBump: createWhatBump(config)
}
}In case of this specific preset, whatBump() impacts the generated release notes because of a) commit object modification (which is a preset issue itself) b) hardcoded breakingHeaderPattern here:
export const breakingHeaderPattern = /^(\w*)(?:\((.*)\))?!: (.*)$/which ignores the breakingHeaderPattern value passed to parserOpts (which, I guess, makes sense as whatBump() is a separate function). If we could overwrite a function - we would be able to align parser and whatBump() logic on our end.
Metadata
Metadata
Assignees
Labels
No labels