From 45fa822ac428225523389de7e45c1c34bee5f892 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Mon, 29 May 2017 18:58:39 -0400 Subject: [PATCH] Fix PR template error --- modules/context/repo.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/context/repo.go b/modules/context/repo.go index 1ae98545a..8b2d45b9e 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -334,13 +334,11 @@ func RepoAssignment(args ...bool) macaron.Handler { if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) { // Pull request is allowed if this is a fork repository // and base repository accepts pull requests. - if repo.BaseRepo != nil { - if repo.BaseRepo.AllowsPulls() { - ctx.Data["BaseRepo"] = repo.BaseRepo - ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo - ctx.Repo.PullRequest.Allowed = true - ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName - } + if repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() { + ctx.Data["BaseRepo"] = repo.BaseRepo + ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo + ctx.Repo.PullRequest.Allowed = true + ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName } else { // Or, this is repository accepts pull requests between branches. if repo.AllowsPulls() {