From deda1839ea5d707d2be9bfa0b3c6de95194cbb13 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 26 Sep 2022 20:14:20 -0400 Subject: [PATCH 1/2] if id is 0, then use local --- services/migrations/gitea_uploader.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 5bf77e6332146..7aefb9472d758 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -411,6 +411,10 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error { Type: foreignreference.TypeIssue, }, } + + if is.ForeignReference.ForeignIndex == "0" { + is.ForeignReference.ForeignIndex = strconv.FormatInt(is.Index, 10) + } if err := g.remapUser(issue, &is); err != nil { return err From c84f2aefb17e4e9109935007183b8336ec4611c6 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Mon, 26 Sep 2022 20:22:53 -0400 Subject: [PATCH 2/2] make fmt --- services/migrations/gitea_uploader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go index 7aefb9472d758..83388391da26f 100644 --- a/services/migrations/gitea_uploader.go +++ b/services/migrations/gitea_uploader.go @@ -411,7 +411,7 @@ func (g *GiteaLocalUploader) CreateIssues(issues ...*base.Issue) error { Type: foreignreference.TypeIssue, }, } - + if is.ForeignReference.ForeignIndex == "0" { is.ForeignReference.ForeignIndex = strconv.FormatInt(is.Index, 10) }