Skip to content

feat(changelog): show the changelog of every version since the installed one - #1290

Open
theluckystrike wants to merge 1 commit into
Scalingo:masterfrom
theluckystrike:fix/changelog-since-installed-version
Open

theluckystrike wants to merge 1 commit into
Scalingo:masterfrom
theluckystrike:fix/changelog-since-installed-version

Conversation

@theluckystrike

Copy link
Copy Markdown

Fixes #1191

  • Add a changelog entry in the section "To Be Released" of CHANGELOG.md

The install script printed scalingo changelog, which shows the last release only. On an upgrade from 1.43.1 to 1.43.3, the changes of 1.43.2 were missing and the Full Changelog link compared 1.43.2...1.43.3.

Change

  • scalingo changelog --since <version> lists the releases (one page of 100, newest first), skips drafts and pre-releases, prints the changelog of each release after <version> without its own Full Changelog line, and ends with one link, for example compare/1.43.1...1.43.3.
  • Without --since, or when the version is the previous one or is not in the list, the output is the same as today: the last release with its own link.
  • dists/install.sh keeps the version that was installed and calls scalingo changelog --since "$old_version". On a fresh install, or with the overwrite answered in advance, it calls scalingo changelog as before. old_version is reset first, so a value from the environment is not used.
  • services/github gets ListReleases.

I compare tag names instead of parsing versions, as the CLI has no semver package in vendor/ and GitHub already returns the releases newest first.

Tests

  • update/changelog_test.go covers changelogSince with no version, an older version, the previous version, an unknown version, drafts and pre-releases, and an empty list.
  • go test ./... and go vet pass. bash -n passes on the install script, and shellcheck reports the same 4 notes as on master.
  • A local build against the real releases: scalingo changelog --since 1.51.0 prints 1.52.0 and 1.51.1 and ends with compare/1.51.0...1.52.0. scalingo changelog prints 1.52.0 only, as before.

…led one

The install script printed the changelog of the last release only, so an
upgrade from 1.43.1 to 1.43.3 skipped what changed in 1.43.2, and the Full
Changelog link compared 1.43.2...1.43.3.

scalingo changelog gets a --since flag. It lists the releases, prints the
changelog of each published release after the given version and ends with
one compare link from that version to the last one. Without the flag, or
with a version that is not in the release list, the output is the same as
before. The install script passes the version that was installed.

Fixes Scalingo#1191
@EtienneM
EtienneM self-requested a review November 20, 2026 07:05
Comment thread services/github/client.go

type Client interface {
GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error)
ListReleases(ctx context.Context) ([]*github.RepositoryRelease, error)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: I feel like it would be better to remove GetLatestRelease and only keep ListReleases. ListReleases should take the PerPage option as argument so that it's set to 1 when we want the latest one. For the other case, it should be defined to the exact number we need depending on the since parameter rather than arbitrarily fetching the last 100 releases.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install script should display the changelog for all versions between the currently installed one and the last one

2 participants