Skip to content

Commit 852876a

Browse files
gary-kimlunny
authored andcommitted
Provide links in commit summaries in commits table/view list (#7659)
* Provide links in commit summaries in commits table/view list Signed-off-by: Gary Kim <[email protected]> * Check that hashes are commits before making them links Signed-off-by: Gary Kim <[email protected]> * Revert "Check that hashes are commits before making them links" This reverts commit a88564b. * Add Commit Message Links to Files List Signed-off-by: Gary Kim <[email protected]>
1 parent 08c6319 commit 852876a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

templates/repo/commits_table.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
</td>
7272
<td class="message">
7373
<span class="message-wrapper">
74-
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary}}</span>
74+
<span class="commit-summary has-emoji{{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessage .Message $.RepoLink $.Repository.ComposeMetas}}</span>
7575
</span>
7676
{{if IsMultilineCommitMessage .Message}}
7777
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>

templates/repo/view_list.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
{{end}}
2929
</a>
3030
{{template "repo/commit_status" .LatestCommitStatus}}
31-
<span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{.LatestCommit.Summary}}
31+
<span class="grey has-emoji commit-summary" title="{{.LatestCommit.Summary}}">{{RenderCommitMessage .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}
3232
{{if IsMultilineCommitMessage .LatestCommit.Message}}
3333
<button class="basic compact mini ui icon button commit-button"><i class="ellipsis horizontal icon"></i></button>
3434
<pre class="commit-body" style="display: none;">{{RenderCommitBody .LatestCommit.Message $.RepoLink $.Repository.ComposeMetas}}</pre>
3535
{{end}}
36-
</span>
36+
</span>
3737
</th>
3838
<th class="text grey right age">{{if .LatestCommit.Author}}{{TimeSince .LatestCommit.Author.When $.Lang}}{{end}}</th>
3939
</tr>
@@ -83,7 +83,7 @@
8383
{{end}}
8484
<td class="message">
8585
<span class="truncate has-emoji">
86-
<a href="{{$.RepoLink}}/commit/{{$commit.ID}}" title="{{$commit.Summary}}">{{$commit.Summary}}</a>
86+
{{RenderCommitMessageLink $commit.Message $.RepoLink (Printf "%s/commit/%s" $.RepoLink $commit.ID) $.Repository.ComposeMetas}}
8787
</span>
8888
</td>
8989
<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>

0 commit comments

Comments
 (0)