Backport (#14897) witch fix couple of issues with feeds
This commit is contained in:
parent
da80e90ac8
commit
8e792986bb
2 changed files with 7 additions and 1 deletions
|
@ -689,6 +689,11 @@ func ActionIcon(opType models.ActionType) string {
|
||||||
// ActionContent2Commits converts action content to push commits
|
// ActionContent2Commits converts action content to push commits
|
||||||
func ActionContent2Commits(act Actioner) *repository.PushCommits {
|
func ActionContent2Commits(act Actioner) *repository.PushCommits {
|
||||||
push := repository.NewPushCommits()
|
push := repository.NewPushCommits()
|
||||||
|
|
||||||
|
if act == nil || act.GetContent() == "" {
|
||||||
|
return push
|
||||||
|
}
|
||||||
|
|
||||||
if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil {
|
if err := json.Unmarshal([]byte(act.GetContent()), push); err != nil {
|
||||||
log.Error("json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err)
|
log.Error("json.Unmarshal:\n%s\nERROR: %v", act.GetContent(), err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,8 @@
|
||||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
|
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
|
||||||
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
|
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
|
||||||
<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</a>
|
<a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</a>
|
||||||
<p class="text light grey">{{index .GetIssueInfos 1 | RenderEmoji}}</p>
|
{{$comment := index .GetIssueInfos 1}}
|
||||||
|
{{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji}}</p>{{end}}
|
||||||
{{else if eq .GetOpType 11}}
|
{{else if eq .GetOpType 11}}
|
||||||
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
|
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
|
||||||
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
|
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
|
||||||
|
|
Reference in a new issue