github-changelog-generator icon indicating copy to clipboard operation
github-changelog-generator copied to clipboard

Do not overwrite human-readable changes to old versions

Open paced opened this issue 5 years ago • 1 comments

This might be best left to external scripts, but I'm interested to see how people feel about it.

My ideal workflow would be:

  1. To run github-changelog-generator on every merge into master as an automatic commit.
  2. Directly commit human-readable changes to CHANGELOG.md in master.
  3. Repeat.

Problem right now is that the human-readable changelogs would be overwritten by step 1. The idea of this feature request is to only add changes to the CHANGELOG.md file in versions that are older than the latest found tag.

An external script can do this:

  1. Parse the CHANGELOG.md file using regex (or by creating a Markdown AST) and collect a file containing all of the sections of versions that have tags.
  2. Create a HISTORY.md file using step 1's output.
  3. Run github-changelog-generator. It will pull HISTORY.md by concatenating to the end of the file.
  4. Delete HISTORY.md (optional).

Any thoughts on this? Thanks!

paced avatar Nov 11 '19 06:11 paced

I wrote a GitHub Action that does this (and other stuff) here.

paced avatar Nov 12 '19 06:11 paced