diff options
Diffstat (limited to 'services/migrations/gitea_uploader.go')
-rw-r--r-- | services/migrations/gitea_uploader.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 21c2dc8f8e..2faa0a1f2a 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -11,11 +11,13 @@ import ( "io" "os" "path/filepath" + "strconv" "strings" "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/db" + "code.gitea.io/gitea/models/foreignreference" repo_model "code.gitea.io/gitea/models/repo" user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/git" @@ -373,6 +375,12 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error { Labels: labels, CreatedUnix: timeutil.TimeStamp(issue.Created.Unix()), UpdatedUnix: timeutil.TimeStamp(issue.Updated.Unix()), + ForeignReference: &foreignreference.ForeignReference{ + LocalIndex: issue.GetLocalIndex(), + ForeignIndex: strconv.FormatInt(issue.GetForeignIndex(), 10), + RepoID: g.repo.ID, + Type: foreignreference.TypeIssue, + }, } if err := g.remapUser(issue, &is); err != nil { |