File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -689,6 +689,11 @@ func ActionIcon(opType models.ActionType) string {
689689// ActionContent2Commits converts action content to push commits
690690func ActionContent2Commits (act Actioner ) * repository.PushCommits {
691691 push := repository .NewPushCommits ()
692+
693+ if act == nil || act .GetContent () == "" {
694+ return push
695+ }
696+
692697 if err := json .Unmarshal ([]byte (act .GetContent ()), push ); err != nil {
693698 log .Error ("json.Unmarshal:\n %s\n ERROR: %v" , act .GetContent (), err )
694699 }
Original file line number Diff line number Diff line change 9696 <span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
9797 {{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
9898 <a href="{{.GetCommentLink}}" class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</a>
99- <p class="text light grey">{{index .GetIssueInfos 1 | RenderEmoji}}</p>
99+ {{$comment := index .GetIssueInfos 1}}
100+ {{if gt (len $comment) 0}}<p class="text light grey">{{$comment | RenderEmoji}}</p>{{end}}
100101 {{else if eq .GetOpType 11}}
101102 <p class="text light grey">{{index .GetIssueInfos 1}}</p>
102103 {{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