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

docs(changelog): add auto-changelog, npm version hook #891

Merged
merged 2 commits into from
Nov 12, 2020

Conversation

LoneRifle
Copy link
Contributor

Problem

A changelog is a file which contains a curated, chronologically ordered list of notable changes for each version of a project. Not having a changelog makes it difficult for developers and open source users to understand the major changes during each release.

Additionally, the use of conventional commit messages are hidden away in the git logs, with some effort required for manual release tagging.

Closes #872

Based off opengovsg/FormSG#306

Solution

Automatically generating and updating a changelog

Use auto-changelog to automatically add git log messages to the CHANGELOG.md during version bump.

Release workflow

  1. Develop as usual using conventional messages for each commit message

  2. During release, use npm version with -m flag to add a custom conventional commit message to tag the git version and auto-populate the changelog.

For example:

$ npm version patch -m "chore: version bump to v4.33.1"
v4.33.1

> GoGovSG@4.33.1 version /.../GoGovSG
> auto-changelog -p && git add CHANGELOG.md

auto-changelog: 17 kB written to CHANGELOG.md

Features:

  • Automatic changelog generation from conventional git commit messages

Improvements:

  • Remove manual effort required to compile changes in the GitHub pull request during release (only if commit messages are clear)

Deploy Notes

New dev dependencies:

  • auto-changelog : For auto-generation and update of CHANGELOG.md

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

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.

Autogenerate CHANGELOG.md from conventional commits
2 participants