mirror of
https://github.com/go-gitea/gitea
synced 2025-08-15 05:58:27 +00:00
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.
This commit is contained in:
@@ -16806,11 +16806,7 @@
|
||||
"x-go-name": "FileName"
|
||||
},
|
||||
"labels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-go-name": "Labels"
|
||||
"$ref": "#/definitions/IssueTemplateLabels"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
@@ -16827,6 +16823,13 @@
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"IssueTemplateLabels": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"x-go-package": "code.gitea.io/gitea/modules/structs"
|
||||
},
|
||||
"Label": {
|
||||
"description": "Label a label to an issue or a pr",
|
||||
"type": "object",
|
||||
|
Reference in New Issue
Block a user