From e3a390096c57246d39889a5bdc1a7daf98868c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=A5=95=E6=96=90?= Date: Tue, 17 Apr 2018 11:57:25 +0800 Subject: [PATCH 1/3] add the Owner Name to differentiate when merging --- routers/repo/pull.go | 2 ++ templates/repo/pulls/compare.tmpl | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/routers/repo/pull.go b/routers/repo/pull.go index a852cee1f300b..f21d8ac7e5632 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -615,8 +615,10 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, * if isSameRepo { headRepo = ctx.Repo.Repository headGitRepo = ctx.Repo.GitRepo + c.Data["BaseName"] = headRepo.Owner.Name } else { headGitRepo, err = git.OpenRepository(models.RepoPath(headUser.Name, headRepo.Name)) + c.Data["BaseName"] = headRepo.BaseRepo.Owner.Name if err != nil { ctx.ServerError("OpenRepository", err) return nil, nil, nil, nil, "", "" diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index 5b71fa5217455..d2e00ace36cfc 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -11,7 +11,7 @@ @@ -29,7 +29,7 @@ ... From 74df8a0fa49fe5c087d1b50e7835b2e72eb7725f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=A5=95=E6=96=90?= Date: Tue, 17 Apr 2018 12:04:44 +0800 Subject: [PATCH 2/3] add the Owner Name to differentiate when merging --- templates/repo/pulls/compare.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index d2e00ace36cfc..a9ea742f09a6a 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -44,7 +44,7 @@ - + {{if .IsNothingToCompare}}
From 7463f9d9c923aeac3bdab47304e7c333ba522f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=A5=95=E6=96=90?= Date: Tue, 17 Apr 2018 12:05:13 +0800 Subject: [PATCH 3/3] add the Owner Name to differentiate when merging --- templates/repo/pulls/compare.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/pulls/compare.tmpl b/templates/repo/pulls/compare.tmpl index a9ea742f09a6a..f0333e754bcfd 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -40,7 +40,7 @@