0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-07-17 15:22:52 +02:00

fix github migration asset ID nil panic

This commit is contained in:
wxiaoguang 2025-07-12 00:33:36 +08:00
parent 806f915b3c
commit fdac8bdd17

View File

@ -322,7 +322,10 @@ func (g *GithubDownloaderV3) convertGithubRelease(ctx context.Context, rel *gith
httpClient := NewMigrationHTTPClient()
for _, asset := range rel.Assets {
assetID := *asset.ID // Don't optimize this, for closure we need a local variable
assetID := asset.GetID() // Don't optimize this, for closure we need a local variable TODO: no need to do so in new Golang
if assetID == 0 {
continue
}
r.Assets = append(r.Assets, &base.ReleaseAsset{
ID: asset.GetID(),
Name: asset.GetName(),