From 7884353a04dfcb1e03b4b26801dc90e7d0d67a5b Mon Sep 17 00:00:00 2001 From: Luo Yifei Date: Tue, 12 Feb 2019 16:37:32 +0800 Subject: [PATCH] Add the Owner Name to differentiate when merging (#3807) --- 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 a65b68a96e..043fc5c93a 100644 --- a/routers/repo/pull.go +++ b/routers/repo/pull.go @@ -692,8 +692,10 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, * if isSameRepo { headRepo = ctx.Repo.Repository headGitRepo = ctx.Repo.GitRepo + ctx.Data["BaseName"] = headUser.Name } else { headGitRepo, err = git.OpenRepository(models.RepoPath(headUser.Name, headRepo.Name)) + ctx.Data["BaseName"] = baseRepo.OwnerName 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 5b71fa5217..d2e00ace36 100644 --- a/templates/repo/pulls/compare.tmpl +++ b/templates/repo/pulls/compare.tmpl @@ -11,7 +11,7 @@ @@ -29,7 +29,7 @@ ...