0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 07:43:18 -05:00

Only migrate the first 255 chars of a Github issue title (#28902) (#28912)

Backport #28902 by @JakobDev

Fixes #28846

Co-authored-by: JakobDev <jakobdev@gmx.de>
(cherry picked from commit cebf55f6b1)
This commit is contained in:
Giteabot 2024-01-24 19:56:54 +08:00 committed by Earl Warren
parent 1cb29ff6a2
commit 9f2c7c2b7d
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -19,6 +19,7 @@ import (
issues_model "code.gitea.io/gitea/models/issues"
repo_model "code.gitea.io/gitea/models/repo"
user_model "code.gitea.io/gitea/models/user"
base_module "code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/label"
"code.gitea.io/gitea/modules/log"
@ -397,7 +398,7 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error {
RepoID: g.repo.ID,
Repo: g.repo,
Index: issue.Number,
Title: issue.Title,
Title: base_module.TruncateString(issue.Title, 255),
Content: issue.Content,
Ref: issue.Ref,
IsClosed: issue.State == "closed",