mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-22 07:40:48 +01:00
Fix PR template error (#1834)
This commit is contained in:
parent
474d636794
commit
642f844735
1 changed files with 5 additions and 7 deletions
|
@ -332,13 +332,11 @@ func RepoAssignment() macaron.Handler {
|
||||||
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
|
if ctx.Repo.IsWriter() || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) {
|
||||||
// Pull request is allowed if this is a fork repository
|
// Pull request is allowed if this is a fork repository
|
||||||
// and base repository accepts pull requests.
|
// and base repository accepts pull requests.
|
||||||
if repo.BaseRepo != nil {
|
if repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() {
|
||||||
if repo.BaseRepo.AllowsPulls() {
|
ctx.Data["BaseRepo"] = repo.BaseRepo
|
||||||
ctx.Data["BaseRepo"] = repo.BaseRepo
|
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
|
||||||
ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo
|
ctx.Repo.PullRequest.Allowed = true
|
||||||
ctx.Repo.PullRequest.Allowed = true
|
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
|
||||||
ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Or, this is repository accepts pull requests between branches.
|
// Or, this is repository accepts pull requests between branches.
|
||||||
if repo.AllowsPulls() {
|
if repo.AllowsPulls() {
|
||||||
|
|
Loading…
Reference in a new issue