File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ func Branches(ctx *context.Context) {
3939 ctx .Data ["Title" ] = "Branches"
4040 ctx .Data ["IsRepoToolbarBranches" ] = true
4141 ctx .Data ["DefaultBranch" ] = ctx .Repo .Repository .DefaultBranch
42+ ctx .Data ["AllowsPulls" ] = ctx .Repo .Repository .AllowsPulls ()
4243 ctx .Data ["IsWriter" ] = ctx .Repo .CanWrite (models .UnitTypeCode )
4344 ctx .Data ["IsMirror" ] = ctx .Repo .Repository .IsMirror
4445 ctx .Data ["PageIsViewCode" ] = true
Original file line number Diff line number Diff line change 6363 </td>
6464 <td class="right aligned">
6565 {{if not .LatestPullRequest}}
66- {{if not .IsDeleted}}
66+ {{if and ( not .IsDeleted) $.AllowsPulls }}
6767 <a href="{{$.RepoLink}}/compare/{{$.DefaultBranch | EscapePound}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | EscapePound}}">
6868 <button id="new-pull-request" class="ui compact basic button">{{$.i18n.Tr "repo.pulls.compare_changes"}}</button>
6969 </a>
You can’t perform that action at this time.
0 commit comments