jwage / changelog-generator

Generate a markdown changelog document from a GitHub milestone.
MIT License
101 stars 8 forks source link

Fix release markdown rendering of double newlines #69

Open glensc opened 2 years ago

glensc commented 2 years ago

Originally posted to https://github.com/laminas/automatic-releases/issues/176

Because there's a double newline between two lists, markdown renders every item with double newlines and considers the two lists as one.

The workaround is to put some non-list element(s) between the lists.

Current behavior

image

markdown source ``` ### Release Notes for [0.19.1](https://github.com/perftools/xhgui/milestone/19) 0.19.x bugfix release (patch) ### 0.19.1 - Total issues resolved: **0** - Total pull requests resolved: **4** - Total contributors: **2** - [442: Cleanup: Remove adding ext-phar for build in Dockerfile](https://github.com/perftools/xhgui/pull/442) thanks to @glensc - [441: Set GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL via env rather secrets](https://github.com/perftools/xhgui/pull/441) thanks to @glensc - [438: Feature: Add driver name to PdoRepository](https://github.com/perftools/xhgui/pull/438) thanks to @glensc - [436: Implement pdo: getForUrl(), getPercentileForUrl(), getAll()](https://github.com/perftools/xhgui/pull/436) thanks to @fengqi ```

Expected behavior

image

markdown source ``` ### Release Notes for [0.19.1](https://github.com/perftools/xhgui/milestone/19) 0.19.x bugfix release (patch) ### 0.19.1 Summary: - Total issues resolved: **0** - Total pull requests resolved: **4** - Total contributors: **2** Pull requests: - [442: Cleanup: Remove adding ext-phar for build in Dockerfile](https://github.com/perftools/xhgui/pull/442) thanks to @glensc - [441: Set GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL via env rather secrets](https://github.com/perftools/xhgui/pull/441) thanks to @glensc - [438: Feature: Add driver name to PdoRepository](https://github.com/perftools/xhgui/pull/438) thanks to @glensc - [436: Implement pdo: getForUrl(), getPercentileForUrl(), getAll()](https://github.com/perftools/xhgui/pull/436) thanks to @fengqi ```
WyriHaximus commented 2 years ago

Interesting, and I assume this only happens because you don't group by labels 🤔 . Let me see, this should be fairly easy to fix.

glensc commented 2 years ago

yeah, I don't have any labels in the project

i was thinking if you out of ideas what to put between lists, perhaps a <hr> aka ---- or some &nbsp; trickery

WyriHaximus commented 2 years ago

Could be, but I also like the Pull requests as a seperator. it also turned out to be a bit trickier to do then I thought. But will continue tonight

WyriHaximus commented 2 years ago

@glensc How would #71 work for you? You'd had to set an extra flag, but that will group everything not matched by (other) labels under the one you specify by the flag.

glensc commented 2 years ago

@WyriHaximus once it's merged and released I have to motivate laminas guys. so if it's enabled by default it would be easier for me :D

WyriHaximus commented 2 years ago

@glensc The only issue with enabling it by default is that would be a backward compatibility break, and that I don't have a good default word.

WyriHaximus commented 2 years ago

@glensc Jumped into that issue, let's see :)

glensc commented 2 years ago

Created https://github.com/laminas/automatic-releases/pull/177. the text will appear before the pr/issue list?

WyriHaximus commented 2 years ago

It is treated like any other label.