File tree 2 files changed +2
-1
lines changed
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) {
39
39
ctx .Data ["Title" ] = "Branches"
40
40
ctx .Data ["IsRepoToolbarBranches" ] = true
41
41
ctx .Data ["DefaultBranch" ] = ctx .Repo .Repository .DefaultBranch
42
+ ctx .Data ["AllowsPulls" ] = ctx .Repo .Repository .AllowsPulls ()
42
43
ctx .Data ["IsWriter" ] = ctx .Repo .CanWrite (models .UnitTypeCode )
43
44
ctx .Data ["IsMirror" ] = ctx .Repo .Repository .IsMirror
44
45
ctx .Data ["PageIsViewCode" ] = true
Original file line number Diff line number Diff line change 63
63
</td>
64
64
<td class="right aligned">
65
65
{{if not .LatestPullRequest}}
66
- {{if not .IsDeleted}}
66
+ {{if and ( not .IsDeleted) $.AllowsPulls }}
67
67
<a href="{{$.RepoLink}}/compare/{{$.DefaultBranch | EscapePound}}...{{if ne $.Repository.Owner.Name $.Owner.Name}}{{$.Owner.Name}}:{{end}}{{.Name | EscapePound}}">
68
68
<button id="new-pull-request" class="ui compact basic button">{{$.i18n.Tr "repo.pulls.compare_changes"}}</button>
69
69
</a>
You can’t perform that action at this time.
0 commit comments