File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -817,6 +817,10 @@ func ActionIcon(opType models.ActionType) string {
817817func ActionContent2Commits (act Actioner ) * repository.PushCommits {
818818 push := repository .NewPushCommits ()
819819
820+ if act == nil || act .GetContent () == "" {
821+ return push
822+ }
823+
820824 json := jsoniter .ConfigCompatibleWithStandardLibrary
821825 if err := json .Unmarshal ([]byte (act .GetContent ()), push ); err != nil {
822826 log .Error ("json.Unmarshal:\n %s\n ERROR: %v" , act .GetContent (), err )
Original file line number Diff line number Diff line change 110110 <span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
111111 {{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
112112 <a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</a>
113- <p class="text light grey">{{index .GetIssueInfos 1 | RenderEmoji}}</p>
113+ {{$comment := index .GetIssueInfos 1}}
114+ {{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji}}</p>{{end}}
114115 {{else if eq .GetOpType 11}}
115116 <p class="text light grey">{{index .GetIssueInfos 1}}</p>
116117 {{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
You can’t perform that action at this time.
0 commit comments