Skip to content

Commit

Permalink
Only migrate the first 255 chars of a Github issue title (#28902) (#2…
Browse files Browse the repository at this point in the history
…8912)

Backport #28902 by @JakobDev

Fixes #28846

Co-authored-by: JakobDev <jakobdev@gmx.de>
  • Loading branch information
GiteaBot and JakobDev authored Jan 24, 2024
1 parent b508813 commit cebf55f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/migrations/gitea_uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit cebf55f

Please sign in to comment.