Browse Source

Fix PR template error (#1834)

tags/v1.2.0-rc1
Ethan Koenig Bo-Yi Wu 8 years ago
parent
commit
8078fbc9dd
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      modules/context/repo.go

+ 5
- 7
modules/context/repo.go View File

@@ -332,13 +332,11 @@ func RepoAssignment() 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() {


Loading…
Cancel
Save