Fix version formatting in releases widget

This commit is contained in:
Svilen Markov
2024-08-30 16:19:20 +01:00
parent 725d0da15d
commit b9bf8c6c96
3 changed files with 12 additions and 14 deletions

View File

@@ -38,16 +38,10 @@ func fetchLatestGithubRelease(request *ReleaseRequest) (*AppRelease, error) {
return nil, err
}
version := response.TagName
if len(version) > 0 && version[0] != 'v' {
version = "v" + version
}
return &AppRelease{
Source: ReleaseSourceGithub,
Name: request.Repository,
Version: version,
Version: normalizeVersionFormat(response.TagName),
NotesUrl: response.HtmlUrl,
TimeReleased: parseRFC3339Time(response.PublishedAt),
Downvotes: response.Reactions.Downvotes,