Mattermost-server: Auto generate plugin changelog using goreleaser

Created on 7 Jan 2020  路  11Comments  路  Source: mattermost/mattermost-server

Use https://github.com/goreleaser/goreleaser to auto generate plugin changelog in the circleci orb. The generated changelog should be used as the body of the GitHub release. See https://github.com/mattermost/mattermost-plugin-github/releases/tag/v0.12.0 for en example changelog.
Screenshot from 2020-01-07 16-18-54

For more context see this conversation.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-19848

AreToolkit Medium Help Wanted PR Exists TecAutomation

Most helpful comment

@hanzei I would like to work on this.

All 11 comments

@hanzei I would like to work on this.

Thanks @RajatVaryani

Hello @hanzei. Can you please put some light on how you generated this changelog?

I explored goreleaser but could not find a straightforward way to do that. Also, how did it group commit messages by enhancements and fixes? Are we using some sort of conventions like this?

Goreleaser generated a changelog under dist/CHANGELOG.md that should be used. It's only a list of the commit messages, but that's fine.

@hanzei Why not use a tool whose primary aim is to generate changelog? e.g conventional-changelog. This is based on https://www.conventionalcommits.org/en/v1.0.0/#summary.

This is how it will look like:
image

@RajatVaryani I have a person aversion to js cli tools. :wink:

But that is not a real reason to not use any of these tools.

What I want is a tool that:

  1. Can be easily run in CLI
  2. Can be updated the the lastest version safely
  3. Won't break in the future on language updates
  4. (Optional) Easy configuration and templating

I'm concerned that 3. will be an issue for js cli tools. Let me know what you think. I'm not hard convinced about goreleaser and open for other suggestion.

@hanzei. I don't have first hand experience with JS so I will defer (But I have heard the same things) and go ahead with goreleaser.

@hanzei I reached out to goreleaser community and I got to know that they generate changelog just using simple git commands internally.

git log --pretty=oneline --abbrev-commit --no-decorate --no-color (git describe --tags --abbrev=0)..HEAD

This is the command used to generate the changelog with some modification. I think we can generate this changelog in the pipeline itself (or a simple bash script if required). What do you think?

Plain git commands seam much better then my idea. :+1:

@hanzei I will be closing this and https://github.com/mattermost/mattermost-server/issues/13586 in this week.

@RajatVaryani Awesome, looking forward to it.

Was this page helpful?
0 / 5 - 0 ratings