File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ func TemplateProcessor() *template.Template {
76
76
}
77
77
return out
78
78
},
79
+ "fit" : func (size int , content string ) string {
80
+ return fmt .Sprintf (fmt .Sprintf ("%%-%d.%ds" , size , size ), content )
81
+ },
79
82
"shellquote" : func (content string ) string {
80
83
return shellquote .Join (content )
81
84
},
@@ -106,6 +109,9 @@ func TemplateProcessor() *template.Template {
106
109
}
107
110
return 120
108
111
},
112
+ "pctOf" : func (size , percent int ) int {
113
+ return int (float32 (size ) * (float32 (percent ) / 100 ))
114
+ },
109
115
"sub" : func (a , b int ) int {
110
116
return a - b
111
117
},
@@ -354,7 +360,7 @@ const defaultEditTemplate = `{{/* edit template */ -}}
354
360
# issue: {{ .key }} - created: {{ .fields.created | age}} ago
355
361
update:
356
362
comment:
357
- - add:
363
+ - add:
358
364
body: |~
359
365
{{ or .overrides.comment "" | indent 10 }}
360
366
fields:
@@ -484,7 +490,7 @@ const defaultTransitionTemplate = `{{/* transition template */ -}}
484
490
{{- if .meta.fields.comment }}
485
491
update:
486
492
comment:
487
- - add:
493
+ - add:
488
494
body: |~
489
495
{{ or .overrides.comment "" | indent 10 }}
490
496
{{- end -}}
You can’t perform that action at this time.
0 commit comments