mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-26 13:29:52 +09:00
fix: prevent panic when GitLab release has more links than sources (#36295)
The code incorrectly assumed rel.Assets.Links and rel.Assets.Sources arrays have equal length. This causes index out of bounds panic when migrating GitLab releases with more links than sources, which is common with GoReleaser-generated releases. Fixes #36292 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
wxiaoguang
parent
426bb491c0
commit
1ee7f8e966
@@ -329,7 +329,6 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith
|
||||
r.Assets = append(r.Assets, &base.ReleaseAsset{
|
||||
ID: asset.GetID(),
|
||||
Name: asset.GetName(),
|
||||
ContentType: asset.ContentType,
|
||||
Size: asset.Size,
|
||||
DownloadCount: asset.DownloadCount,
|
||||
Created: asset.CreatedAt.Time,
|
||||
|
||||
Reference in New Issue
Block a user