diff options
author | Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> | 2020-06-19 09:19:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 15:19:56 +0800 |
commit | 92a05f87f070b0d2a1e9eb53072e00f0f1c3b69a (patch) | |
tree | d072f4c39887579c6ab5547be3717f67cdc9bafb /templates | |
parent | ec40e593cfc4d208c6a81fbcb1b4044ce45b956e (diff) | |
download | gitea-92a05f87f070b0d2a1e9eb53072e00f0f1c3b69a.tar.gz gitea-92a05f87f070b0d2a1e9eb53072e00f0f1c3b69a.zip |
Use only first line of commit when creating referenced comment (#11960)
* Use only first line of commit when creating referenced comment
* Update modules/repofiles/action.go
* Display first line only on feeds too
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/dashboard/feeds.tmpl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index a1b4218dc4..a67fe54849 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -79,7 +79,8 @@ {{ $repoLink := .GetRepoLink}} {{if $push.Commits}} {{range $push.Commits}} - <li><img class="img-8" src="{{$push.AvatarLink .AuthorEmail}}"> <a class="commit-id" href="{{$repoLink}}/commit/{{.Sha1}}">{{ShortSha .Sha1}}</a> <span class="text truncate light grey">{{.Message}}</span></li> + {{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}} + <li><img class="img-8" src="{{$push.AvatarLink .AuthorEmail}}"> <a class="commit-id" href="{{$commitLink}}">{{ShortSha .Sha1}}</a> <span class="text truncate light grey">{{RenderCommitMessage .Message $repoLink $.ComposeMetas}}</span></li> {{end}} {{end}} {{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.i18n.Tr "action.compare_commits" $push.Len}} ยป</a></li>{{end}} |