nearform-actions/optic-release-automation-action

Improve reliability of release notes

Closed this issue ยท 2 comments

At the moment GitHub seems to be quite unreliable in terms of how release notes for a release are generated, in the sense that sometimes (quite often), the release notes generated automatically in the draft release include changes from earlier releases, rather than from the latest release.

The way we're doing it now is:

  1. generate draft release (it will/may have wrong release notes because gh picks up a wrong release as the previous release)
  2. grab the body of the release and include it in the PR opened by this action

Because GH API doesn't support specifying a previous release when creating a new release, there don't seem to be ways to accomplish what we need, but on the other hand the API supports an operation to just generate the release notes (without saving them anywhere) and this API does allow specifying a previous release. See here.

So, an approach we may want to investigate is:

  1. get the latest release. see here
  2. generate release notes for the next release using this endpoint and providing the previous_tag_name input
  3. create the new release switching off automatic release notes generation and providing the release notes in the body of the request

This is the discussion where people are reporting this issue to GitHub community/community#5975

๐ŸŽ‰ This issue has been resolved in version 4.2.0 ๐ŸŽ‰

The release is available on:

Your optic bot ๐Ÿ“ฆ๐Ÿš€