aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r--modules/context/repo.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 0908340879..096f3c0a5d 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -455,15 +455,13 @@ func RepoAssignment() macaron.Handler {
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
ctx.Repo.PullRequest.Allowed = true
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
- } else {
+ } else if repo.AllowsPulls() {
// Or, this is repository accepts pull requests between branches.
- if repo.AllowsPulls() {
- ctx.Data["BaseRepo"] = repo
- ctx.Repo.PullRequest.BaseRepo = repo
- ctx.Repo.PullRequest.Allowed = true
- ctx.Repo.PullRequest.SameRepo = true
- ctx.Repo.PullRequest.HeadInfo = ctx.Repo.BranchName
- }
+ ctx.Data["BaseRepo"] = repo
+ ctx.Repo.PullRequest.BaseRepo = repo
+ ctx.Repo.PullRequest.Allowed = true
+ ctx.Repo.PullRequest.SameRepo = true
+ ctx.Repo.PullRequest.HeadInfo = ctx.Repo.BranchName
}
}
ctx.Data["PullRequestCtx"] = ctx.Repo.PullRequest