]> source.dussan.org Git - gitea.git/commit
Support comma-delimited string as labels in issue template (#21831) (#21873)
authorJason Song <i@wolfogre.com>
Sun, 20 Nov 2022 10:44:20 +0000 (18:44 +0800)
committerGitHub <noreply@github.com>
Sun, 20 Nov 2022 10:44:20 +0000 (10:44 +0000)
commit7a004ad7eb02b4295e78142af10ae18cf2ed9827
tree9da83cd6a42eb05786073b52f4b6ed4399e4068a
parentaf8b2250c449dbbd9df3d40c2c8847d39d43c853
Support comma-delimited string as labels in issue template (#21831) (#21873)

Backport #21831.

The [labels in issue YAML templates](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax)
can be a string array or a comma-delimited string, so a single string
should be valid labels.

The old codes committed in #20987 ignore this, that's why the warning is
displayed:

<img width="618" alt="image" src="https://user-images.githubusercontent.com/9418365/202112642-93dc72d0-71c3-40a2-9720-30fc2d48c97c.png">

Fixes #17877.
modules/issue/template/template.go
modules/issue/template/template_test.go
modules/issue/template/unmarshal.go
modules/markup/markdown/meta_test.go
modules/structs/issue.go
modules/structs/issue_test.go
templates/swagger/v1_json.tmpl