Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can I use custom content? #165

Open
wintercounter opened this issue Aug 21, 2019 · 0 comments
Open

Can I use custom content? #165

wintercounter opened this issue Aug 21, 2019 · 0 comments

Comments

@wintercounter
Copy link

wintercounter commented Aug 21, 2019

I want to use the changelog generated by standard-version because it look much nicer. Is it possible somehow to pass custom content? Maybe a new flag where I can pass a changelog's path to be used?

I have a regex to fetch content from changelogs.

Something like this:

const start = changelog.match(new RegExp(`^#.*${escapeRegExp(version)}.*`, 'gm'))
changelog += '\n#0.0.0' // eslint-disable-line
const match = Array.from(
    changelog.matchAll(new RegExp(`${escapeRegExp(start)}([\\s\\S]+?)(^#{1,4}.*\\d+\\.\\d+\\.\\d+)`, 'gm'))
)[0]

This will search for headers with a specified semver version included until another header including semver version and use the content between this two.

I can understand if there's no intention to implement such solution, however custom content would be nice and I couldn't find any docs related to achieve such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant