File tree 2 files changed +6
-1
lines changed
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 {
817
817
func ActionContent2Commits (act Actioner ) * repository.PushCommits {
818
818
push := repository .NewPushCommits ()
819
819
820
+ if act == nil || act .GetContent () == "" {
821
+ return push
822
+ }
823
+
820
824
json := jsoniter .ConfigCompatibleWithStandardLibrary
821
825
if err := json .Unmarshal ([]byte (act .GetContent ()), push ); err != nil {
822
826
log .Error ("json.Unmarshal:\n %s\n ERROR: %v" , act .GetContent (), err )
Original file line number Diff line number Diff line change 110
110
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji}}</span>
111
111
{{else if or (eq .GetOpType 10) (eq .GetOpType 21) (eq .GetOpType 22) (eq .GetOpType 23)}}
112
112
<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}}
114
115
{{else if eq .GetOpType 11}}
115
116
<p class="text light grey">{{index .GetIssueInfos 1}}</p>
116
117
{{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