Fix various bugs (#35177)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled

* Fix #35144
* Fix #35117
* Fix https://github.com/go-gitea/gitea/issues/35054#issuecomment-3131793977
* Fix #35136
This commit is contained in:
wxiaoguang
2025-07-30 15:08:59 +08:00
committed by GitHub
parent b7d8fade72
commit 85b5877bb0
11 changed files with 84 additions and 33 deletions

View File

@ -402,16 +402,11 @@ func pushUpdateAddTags(ctx context.Context, repo *repo_model.Repository, gitRepo
}
rel, has := relMap[lowerTag]
parts := strings.SplitN(tag.Message, "\n", 2)
note := ""
if len(parts) > 1 {
note = parts[1]
}
title, note := git.SplitCommitTitleBody(tag.Message, 255)
if !has {
rel = &repo_model.Release{
RepoID: repo.ID,
Title: parts[0],
Title: title,
TagName: tags[i],
LowerTagName: lowerTag,
Target: "",
@ -430,7 +425,7 @@ func pushUpdateAddTags(ctx context.Context, repo *repo_model.Repository, gitRepo
rel.Sha1 = commit.ID.String()
rel.CreatedUnix = timeutil.TimeStamp(createdAt.Unix())
if rel.IsTag {
rel.Title = parts[0]
rel.Title = title
rel.Note = note
} else {
rel.IsDraft = false