Skip to content

Commit

Permalink
fix(repository): reverse argument for compare
Browse files Browse the repository at this point in the history
  • Loading branch information
bdronneau authored and ViBiOh committed Sep 3, 2021
1 parent 26f1ea9 commit e4cb1b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/model/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (r Repository) VersionURL(version string) string {
func (r Repository) CompareURL(version string, pattern string) string {
switch r.Kind {
case Github:
return fmt.Sprintf("%s/%s/compare/%s...%s", githubURL, r.Name, r.Versions[pattern], version)
return fmt.Sprintf("%s/%s/compare/%s...%s", githubURL, r.Name, version, r.Versions[pattern])
default:
return r.URL(pattern)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func TestCompareURL(t *testing.T) {
version: "1.0.0",
pattern: DefaultPattern,
},
"https://github.com/vibioh/ketchup/compare/1.1.0...1.0.0",
"https://github.com/vibioh/ketchup/compare/1.0.0...1.1.0",
},
}

Expand Down

0 comments on commit e4cb1b2

Please sign in to comment.