improvement some release related code (#19867)

This commit is contained in:
Lunny Xiao 2022-06-03 14:13:58 +08:00 committed by GitHub
parent 0c759fd4de
commit e09fb30d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 35 additions and 52 deletions

View file

@ -399,7 +399,7 @@ func pushUpdateAddTags(ctx context.Context, repo *repo_model.Repository, gitRepo
}
if len(newReleases) > 0 {
if err = models.InsertReleasesContext(ctx, newReleases); err != nil {
if err = db.Insert(ctx, newReleases); err != nil {
return fmt.Errorf("Insert: %v", err)
}
}