Skip to content

Commit 5f212ff

Browse files
authored
Fix PR template error (#2008)
2 parents 1ac8646 + 45fa822 commit 5f212ff

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

modules/context/repo.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,11 @@ func RepoAssignment(args ...bool) macaron.Handler {
334334
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
335335
// Pull request is allowed if this is a fork repository
336336
// and base repository accepts pull requests.
337-
if repo.BaseRepo != nil {
338-
if repo.BaseRepo.AllowsPulls() {
339-
ctx.Data["BaseRepo"] = repo.BaseRepo
340-
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
341-
ctx.Repo.PullRequest.Allowed = true
342-
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
343-
}
337+
if repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() {
338+
ctx.Data["BaseRepo"] = repo.BaseRepo
339+
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
340+
ctx.Repo.PullRequest.Allowed = true
341+
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
344342
} else {
345343
// Or, this is repository accepts pull requests between branches.
346344
if repo.AllowsPulls() {

0 commit comments

Comments
 (0)