Closed arkadioz closed 10 months ago
I just tried to generate it the same way that you would do when using semantic-release tool, just adding the following config at the releaserc config file:
[
"@semantic-release/changelog",
{
"changelogFile": "docs/CHANGELOG.md",
"changelogTitle": "# Gitmoji Changelog"
}
]
and then at the @semantic-release/git part:
[
'@semantic-release/git',
{
assets: [
"**/pom.xml",
"docs/CHANGELOG.md"
],
message: [
':bookmark: v${nextRelease.version} [skip ci]',
'',
'https://github.com/user/repo/releases/tag/${nextRelease.gitTag}'
].join('\n')
}
]
and so far it works as expected, if this is all that must be done to generate the changelog it would be good to add this mention to the README of the project because when I first readed it, I though it was not going to be able to generate the changelog because the doc mentions:
"semantic-release-gitmoji should be used in place of both @semantic-release/commit-analyzer and @semantic-release/release-notes-generator since the both plugins parse commits following the conventional changelog while this plugin requires Gitmoji commits."
And also there is no changelog.md file on this repository and it is not included in the example neither
Because I think that it only works with conventional commits and not sure if you can modify that behaviour or template
The changelog plugin has nothing to do with the generation of release notes.
It receives a string of release notes from release notes generator like @semantic-release/release-notes-generator or this plugin.
Therefore, it works not only for conventional commits but for any commits in any formats.
It is @semantic-release/release-notes-generator that is dedicated to conventional commits.
There is no changelog.md file on this repository and it is not included in the example neither
This plugin has nothing to do with the generation of changelog.
It is dedicated to parse gitmoji commits and generate release notes.
semantic-release-gitmoji only replaces @semantic-release/commit-analyzer and @semantic-release/release-notes-generator, not @semantic-release/changelog, as stated in README.
By the way, change log are not the first-hand product by semantic-release
, it is made from the ecosystem, that is, users should generate them via extra plugins like @semantic-release/changelog.
To generate changelogs, just follow how the ecosystem suggests and this plugin will provide release notes required by changelog plugins.
That's why nothing about generating changelogs mentioned in README or at any place in this repository. Because it is out of the scope.
Thank you for asking. Hope it help you understand this plugin (and the semantic-release ecosystem) better.
Thank you for the fast reply and clarifications on this
Not sure if the tool can generate a changelog just like the semantic-release tool does with the changelog plugin
At the end of the day the content it writes into the changelog is the same that goes into the release notes, if it is possible I appreciate any example config.
I am a little bit new into this kind of configurations/automatization, I imagine that also in case it is not possible to generate it just with this tool, it could be possible to use the changelog plugin in the same pipeline running your semantic-release-gitmoji tool, but I wonder how to tell the changelog plugin to identify the emojis also as features or bugfixes or breaking changes, etc. Because I think that it only works with conventional commits and not sure if you can modify that behaviour or template