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

support CHANGELOG generating hook #383

Closed
kazupon opened this issue Oct 31, 2019 · 5 comments · Fixed by #389
Closed

support CHANGELOG generating hook #383

kazupon opened this issue Oct 31, 2019 · 5 comments · Fixed by #389

Comments

@kazupon
Copy link
Contributor

kazupon commented Oct 31, 2019

Is your feature request related to a problem? Please describe.
In shipjs, CHANGELOG is generated with conventional-changelog-cli.
CHANGELOG generation can be customized by setting conventionalChangelogArgs.

However, if CHANGELOG can be generated by another way than conventional-changelog-cli, it may be convenient to use other tools (e.g. lerna-changelog).

Describe the solution you'd like

module.exports = {
  generateChangelog: ({ config }) => {
    // something to do ...
  }
}

Additional context
PR-based changelog generator
https://github.com/lerna/lerna-changelog

@eunjae-lee
Copy link
Contributor

@kazupon Hi there,
Thanks for your suggestion.
I will definitely take a look at lerna-changelog since it properly supports monorepos.
In the meantime, you can do a workaround like this:

export default {
  updateChangelog: false,
  beforeCommitChanges: ({ exec, dir }) => {
    exec(`npx lerna-changelog ....`);
  }
}

@kazupon
Copy link
Contributor Author

kazupon commented Nov 1, 2019

@eunjae-lee
Thank you for your workaround!

I've checked shipjs codes and behavior.
I hope nextVersion argument of beforeCommitChanges, because it's convenient as meta info with changelog generator.

And also, I've noticed the changelog generator have some different format.
e.g.

So, In GitHub release of shipjs trigger, I need changelog extraction hook.
In this code, changelog is extracted by getChangelog.
I hope it can be customized with the getChangelog hook.

@eunjae-lee
Copy link
Contributor

Hi @kazupon ,
thanks for the detailed explanation.
I do agree with the points.
I will work on it and let you know how it goes.

Thanks 😄

@kazupon
Copy link
Contributor Author

kazupon commented Nov 5, 2019

Thanks! I’ll try later 💪

@eunjae-lee
Copy link
Contributor

@kazupon I took a little different approach. I just changed getChangelog to work well with both conventional-changelog and lerna-changelog :)

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 a pull request may close this issue.

2 participants