From 2739a0be98c0a565d7e1a7f37750c77c1df9338c Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 14 Jul 2019 17:16:15 +0800 Subject: [PATCH] only create opened pull request when migrating from github (#7463) --- modules/migrations/gitea.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go index b15aed5f4be8..3320a8cb6d61 100644 --- a/modules/migrations/gitea.go +++ b/modules/migrations/gitea.go @@ -383,7 +383,7 @@ func (g *GiteaLocalUploader) newPullRequest(pr *base.PullRequest) (*models.PullR } var head = "unknown repository" - if pr.IsForkPullRequest() { + if pr.IsForkPullRequest() && pr.State != "closed" { if pr.Head.OwnerName != "" { remote := pr.Head.OwnerName _, ok := g.prHeadCache[remote]