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

feat: new option transformCommits to postprocess commits #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ext
Copy link

@ext ext commented Aug 13, 2020

Adds a new option transformCommits to postprocess commit list before release notes are generated.

While it is possible to create a custom reader it might not always be desirable to maintain a forked to only augment slightly. Additionally the reader is only passed the commit message and not the full parsed data such as SHA. My personal use-case is to automatically set the scope of the commit in a monorepo setup based on which packages the commit touches.

The option can either be a function (usable when using a .js configuration file) or anything resolvable using require which default exports a single function. In both cases the function takes a single commit object (same object as is passed to conventional-changelog-writer later) and expects it to return a similar transformed object.

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

Successfully merging this pull request may close these issues.

None yet

1 participant