Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions routers/web/repo/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ func Commits(ctx *context.Context) {
}
commitsTagsMap, err := repo_model.FindTagsByCommitIDs(ctx, ctx.Repo.Repository.ID, commitIDs...)
if err != nil {
ctx.ServerError("CommitsByRange", err)
return
log.Error("FindTagsByCommitIDs: %v", err)
ctx.Flash.Error("Load tags failed because of internal error")
} else {
ctx.Data["CommitsTagsMap"] = commitsTagsMap
}
ctx.Data["CommitsTagsMap"] = commitsTagsMap
ctx.Data["Username"] = ctx.Repo.Owner.Name
ctx.Data["Reponame"] = ctx.Repo.Repository.Name
ctx.Data["CommitCount"] = commitsCount
Expand Down
6 changes: 4 additions & 2 deletions templates/repo/commits_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@
{{if IsMultilineCommitMessage .Message}}
<pre class="commit-body tw-hidden">{{RenderCommitBody $.Context .Message ($.Repository.ComposeMetas ctx)}}</pre>
{{end}}
{{range (index $.CommitsTagsMap .ID.String)}}
{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
{{if $.CommitsTagsMap}}
{{range (index $.CommitsTagsMap .ID.String)}}
{{- template "repo/tag/name" dict "RepoLink" $.Repository.Link "TagName" .TagName "IsRelease" (not .IsTag) -}}
{{end}}
{{end}}
</td>
{{if .Committer}}
Expand Down