chelnak / gh-changelog

A gh cli extension that will make your changelogs ✨
MIT License
114 stars 4 forks source link

Full Changelog in GitHub Release too broad #144

Closed LukasAud closed 6 months ago

LukasAud commented 7 months ago

Hi @chelnak, we noticed an issue raised in our repos that had to do with unexpected behaviour with full changelog generation, so we wanted to make you aware of this.

Describe the Bug

When the Module Release workflow generates a new GitHub Release, it includes a "Full Changelog" link that shows every commit between the first commit in the repo and the current release.

This differs from the CHANGELOG.md generated from the Module Release Prep workflow, which also includes a "Full Changelog" link but only shows the commits between the previous and current releases.

Expected Behavior

I would expect the changelog in a GitHub Release to show a more limited range of changes, or maybe omit the "Full Changelog" link altogether. Many Ruby projects do not include such a link, not all users are interested in just the changes between the two latest releases, and GitHub's UI provides a way to compare the changes between a release and any tag or branch.

For reference, this is the result we would expect: https://github.com/puppetlabs/puppetlabs-apt/compare/v9.2.0...v9.4.0 And this is the actual result appearing: https://github.com/puppetlabs/puppetlabs-apt/compare/f848bac6072f99e1cd60a0cc0b84e5679c598dab...v9.4.0

Steps to Reproduce

Click on the "Full Changelog" link in any GitHub Release generated by the Module Release workflow (such as here: https://github.com/puppetlabs/puppetlabs-apt/releases/tag/v9.4.0).

Additional Context

This was originally reported in the Puppet community Slack: https://puppetcommunity.slack.com/archives/C11LCKKQ9/p1709771123022279

chelnak commented 7 months ago

Hey!

I wonder what is happening there.

If the changelog that gets added to the release is not adding value maybe it should be removed.

What do you think?

LukasAud commented 7 months ago

We believe it might be a problem with how the link for the 'Full changelog' button is being generated.

The link that works incorrectly is the one that contains a commit instead of a tag in it: puppetlabs/puppetlabs-apt@f848bac...v9.4.0

while the correct one simply uses tags to delimit start and end: puppetlabs/puppetlabs-apt@v9.2.0...v9.4.0

chelnak commented 7 months ago

Yeah I think it's getting confused a bit. I'll try to take a look over the weekend.