mirror of
https://github.com/apricote/releaser-pleaser.git
synced 2026-01-13 13:21:00 +00:00
feat: less repetitive entries for for prerelease changelogs (#37)
Right now we always show all new releasable commits since the last _stable_ release. If a project publishes multiple pre-releases in a row, they all repeat the same lines with a few new additions. On the other hand, when we cut a stable release, we do want to show all changes since the last stable release, as we can not expect users to read the changelog of pre-releases. As a compromise, the code now looks at the type of release that is being created, and decides based on that if we will look at STABLE..HEAD (stable release) or LATEST..HEAD (pre-release). Close #33
This commit is contained in:
parent
693ca21e32
commit
971b6e6ef7
2 changed files with 22 additions and 4 deletions
|
|
@ -178,7 +178,15 @@ func (rp *ReleaserPleaser) runReconcileReleasePR(ctx context.Context) error {
|
|||
logger.InfoContext(ctx, "no latest tag found")
|
||||
}
|
||||
|
||||
releasableCommits, err := rp.forge.CommitsSince(ctx, releases.Stable)
|
||||
// By default, we want to show everything that has happened since the last stable release
|
||||
lastReleaseCommit := releases.Stable
|
||||
if releaseOverrides.NextVersionType.IsPrerelease() {
|
||||
// if the new release will be a prerelease,
|
||||
// only show changes since the latest release (stable or prerelease)
|
||||
lastReleaseCommit = releases.Latest
|
||||
}
|
||||
|
||||
releasableCommits, err := rp.forge.CommitsSince(ctx, lastReleaseCommit)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue