Skip to content

Commit 14de28b

Browse files
authored
Fix release link broken (#18253)
* Fix release link broken * Fix unsupported compare * Fix another place
1 parent e4120bb commit 14de28b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/repo/release/list.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
100100
</span>
101101
{{ end }}
102-
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{.Target}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" $.DefaultBranch}}</span>
102+
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{if .Target}}{{.Target}}{{else}}{{$.DefaultBranch}}{{end}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" $.DefaultBranch}}</span>
103103
</p>
104104
<div class="download">
105105
{{if $.Permission.CanRead $.UnitTypeCode}}
@@ -135,7 +135,7 @@
135135
<span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span>
136136
{{end}}
137137
{{if not .IsDraft}}
138-
| <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{.Target}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" .Target}}</span>
138+
| <span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{if .Target}}{{.Target}}{{else}}{{$.DefaultBranch}}{{end}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" .Target}}</span>
139139
{{end}}
140140
</p>
141141
<div class="markup desc">

0 commit comments

Comments
 (0)