Skip to content

Commit 642f844

Browse files
ethantkoenigappleboy
authored andcommitted
Fix PR template error (#1834)
1 parent 474d636 commit 642f844

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
@@ -332,13 +332,11 @@ func RepoAssignment() macaron.Handler {
332332
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
333333
// Pull request is allowed if this is a fork repository
334334
// and base repository accepts pull requests.
335-
if repo.BaseRepo != nil {
336-
if repo.BaseRepo.AllowsPulls() {
337-
ctx.Data["BaseRepo"] = repo.BaseRepo
338-
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
339-
ctx.Repo.PullRequest.Allowed = true
340-
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
341-
}
335+
if repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() {
336+
ctx.Data["BaseRepo"] = repo.BaseRepo
337+
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
338+
ctx.Repo.PullRequest.Allowed = true
339+
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
342340
} else {
343341
// Or, this is repository accepts pull requests between branches.
344342
if repo.AllowsPulls() {

0 commit comments

Comments
 (0)