Repository navigation
feat(changelog): show the changelog of every version since the installed one - #1290
Open
theluckystrike wants to merge 1 commit into
Open
theluckystrike wants to merge 1 commit into
theluckystrike wants to merge 1 commit into
Conversation
…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
self-requested a review
November 20, 2026 07:05
EtienneM
requested changes
Nov 20, 2026
|
|
||
| type Client interface { | ||
| GetLatestRelease(ctx context.Context) (*github.RepositoryRelease, error) | ||
| ListReleases(ctx context.Context) ([]*github.RepositoryRelease, error) |
Member
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1191
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 examplecompare/1.43.1...1.43.3.--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.shkeeps the version that was installed and callsscalingo changelog --since "$old_version". On a fresh install, or with the overwrite answered in advance, it callsscalingo changelogas before.old_versionis reset first, so a value from the environment is not used.services/githubgetsListReleases.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.gocoverschangelogSincewith no version, an older version, the previous version, an unknown version, drafts and pre-releases, and an empty list.go test ./...andgo vetpass.bash -npasses on the install script, and shellcheck reports the same 4 notes as on master.scalingo changelog --since 1.51.0prints 1.52.0 and 1.51.1 and ends withcompare/1.51.0...1.52.0.scalingo changelogprints 1.52.0 only, as before.