File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Expand file tree Collapse file tree 3 files changed +16
-11
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 36
36
<td><button type="submit" class="ui green button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
37
37
</tr>
38
38
{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
39
- <tr>
40
- <td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
41
- {{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
42
- <td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
43
- </tr>
39
+ <tr>
40
+ <td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
41
+ {{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
42
+ <td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
43
+ </tr>
44
+ <tr>
45
+ <td>{{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}<br/>
46
+ {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
47
+ <td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
48
+ </tr>
44
49
{{end}}
45
- <tr>
46
- <td>{{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}<br/>
47
- {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}}</td>
48
- <td><button type="submit" class="ui green button" name="op" value="resync_all_sshprincipals">{{svg "octicon-play" 16}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
49
- </tr>
50
50
<tr>
51
51
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
52
52
<td><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
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