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

Question: Can the tool also generate the changelog.md? #86

Closed
arkadioz opened this issue Jan 7, 2024 · 3 comments
Closed

Question: Can the tool also generate the changelog.md? #86

arkadioz opened this issue Jan 7, 2024 · 3 comments
Labels
question Further information is requested

Comments

@arkadioz
Copy link

arkadioz commented Jan 7, 2024

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

@arkadioz
Copy link
Author

arkadioz commented Jan 8, 2024

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

@momocow
Copy link
Owner

momocow commented Jan 8, 2024

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.

@momocow momocow added the question Further information is requested label Jan 8, 2024
@arkadioz
Copy link
Author

arkadioz commented Jan 8, 2024

Thank you for the fast reply and clarifications on this

@arkadioz arkadioz closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants