From: Lunny Xiao Date: Sun, 14 Jul 2019 09:16:15 +0000 (+0800) Subject: only create opened pull request when migrating from github (#7463) X-Git-Tag: v1.10.0-rc1~391 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2739a0be98c0a565d7e1a7f37750c77c1df9338c;p=gitea.git only create opened pull request when migrating from github (#7463) --- diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go index b15aed5f4b..3320a8cb6d 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]