Skip to content

Commit 067d82b

Browse files
zeripathlafrikstechknowlogick
authored
Prevent 500 on draft releases without tag (#16634)
It is possible to create draft releases prior to creating a tag. This will cause a 500 on the releases page due to compare page failing. This PR only shows the compare button if there is a SHA1 present. Fix #16610 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent ab9bb54 commit 067d82b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

templates/repo/release/list.tmpl

+3-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@
8282
<a class="mono" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a>
8383
</span>
8484
{{end}}
85-
{{template "repo/branch_dropdown" dict "root" $ "release" .}}
85+
{{if .Sha1 }}
86+
{{template "repo/branch_dropdown" dict "root" $ "release" .}}
87+
{{end}}
8688
{{end}}
8789
</div>
8890
<div class="ui twelve wide column detail">

0 commit comments

Comments
 (0)