Skip to content

Commit dd95d1b

Browse files
committed
remove DefaultBranch
1 parent 286a889 commit dd95d1b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

services/context/repo.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,6 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
551551
ctx.Data["Title"] = owner.Name + "/" + repo.Name
552552
ctx.Data["Repository"] = repo
553553
ctx.Data["Owner"] = ctx.Repo.Repository.Owner
554-
ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch
555554
ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner()
556555
ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin()
557556
ctx.Data["RepoOwnerIsOrganization"] = repo.Owner.IsOrganization()

templates/repo/sub_menu.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</a>
1515
{{end}}
1616
{{if .DetectedRepoLicenses}}
17-
<a class="item muted" href="{{.RepoLink}}/src/{{.DefaultBranch}}/{{PathEscapeSegments .DetectedLicenseFileName}}" data-tooltip-placement="top" data-tooltip-content="{{StringUtils.Join .DetectedRepoLicenses ", "}}">
17+
<a class="item muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .DetectedLicenseFileName}}" data-tooltip-placement="top" data-tooltip-content="{{StringUtils.Join .DetectedRepoLicenses ", "}}">
1818
{{svg "octicon-law"}} <b>{{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}}</b>
1919
</a>
2020
{{end}}

0 commit comments

Comments
 (0)