Only show "New Pull Request" button if repo allows pulls (#7426)
Signed-off-by: Gary Kim <gary@garykim.dev>
This commit is contained in:
parent
a7b1ba0e3d
commit
072bdfa3f5
2 changed files with 2 additions and 1 deletions
|
@ -39,6 +39,7 @@ func Branches(ctx *context.Context) {
|
|||
ctx.Data["Title"] = "Branches"
|
||||
ctx.Data["IsRepoToolbarBranches"] = true
|
||||
ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch
|
||||
ctx.Data["AllowsPulls"] = ctx.Repo.Repository.AllowsPulls()
|
||||
ctx.Data["IsWriter"] = ctx.Repo.CanWrite(models.UnitTypeCode)
|
||||
ctx.Data["IsMirror"] = ctx.Repo.Repository.IsMirror
|
||||
ctx.Data["PageIsViewCode"] = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue