diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-11-13 23:19:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 07:19:14 +0000 |
commit | 98d9a71ffe510da0e10d042d8f87a348022aca87 (patch) | |
tree | 992e8ce7a950ac4cef03c435fdd14897312b11f9 /models/issues/pull.go | |
parent | b4abb6deff14b741c7666d7579e0eea68443306c (diff) | |
download | gitea-98d9a71ffe510da0e10d042d8f87a348022aca87.tar.gz gitea-98d9a71ffe510da0e10d042d8f87a348022aca87.zip |
Trim title before insert/update to database to match the size requirements of database (#32498)
Fix #32489
Diffstat (limited to 'models/issues/pull.go')
-rw-r--r-- | models/issues/pull.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/issues/pull.go b/models/issues/pull.go index 4475ab3a4f..853e2a69e6 100644 --- a/models/issues/pull.go +++ b/models/issues/pull.go @@ -572,6 +572,7 @@ func NewPullRequest(ctx context.Context, repo *repo_model.Repository, issue *Iss } issue.Index = idx + issue.Title, _ = util.SplitStringAtByteN(issue.Title, 255) if err = NewIssueWithIndex(ctx, issue.Poster, NewIssueOptions{ Repo: repo, |