Trim title before insert/update to database to match the size requirements of database (#32498) (#32507)

This commit is contained in:
Lunny Xiao
2024-11-14 18:06:31 -08:00
committed by GitHub
parent f79f8e13e3
commit 781310df77
8 changed files with 18 additions and 0 deletions
+1
View File
@@ -142,6 +142,7 @@ func CreateRelease(gitRepo *git.Repository, rel *repo_model.Release, attachmentU
return err
}
rel.Title, _ = util.SplitStringAtByteN(rel.Title, 255)
rel.LowerTagName = strings.ToLower(rel.TagName)
if err = db.Insert(gitRepo.Ctx, rel); err != nil {
return err