aboutsummaryrefslogtreecommitdiffstats
path: root/modules/issue/template/template.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/issue/template/template.go')
-rw-r--r--modules/issue/template/template.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/issue/template/template.go b/modules/issue/template/template.go
index cf5fcf28e5..0a105c723c 100644
--- a/modules/issue/template/template.go
+++ b/modules/issue/template/template.go
@@ -88,6 +88,9 @@ func validateYaml(template *api.IssueTemplate) error {
if err := validateBoolItem(position, field.Attributes, "multiple"); err != nil {
return err
}
+ if err := validateBoolItem(position, field.Attributes, "list"); err != nil {
+ return err
+ }
if err := validateOptions(field, idx); err != nil {
return err
}
@@ -340,7 +343,13 @@ func (f *valuedField) WriteTo(builder *strings.Builder) {
}
}
if len(checkeds) > 0 {
- _, _ = fmt.Fprintf(builder, "%s\n", strings.Join(checkeds, ", "))
+ if list, ok := f.Attributes["list"].(bool); ok && list {
+ for _, check := range checkeds {
+ _, _ = fmt.Fprintf(builder, "- %s\n", check)
+ }
+ } else {
+ _, _ = fmt.Fprintf(builder, "%s\n", strings.Join(checkeds, ", "))
+ }
} else {
_, _ = fmt.Fprint(builder, blankPlaceholder)
}