Skip to content

Commit fd0b929

Browse files
authored
Allow string labels (SchemaStore#4897)
1 parent a4ae54b commit fd0b929

File tree

3 files changed

+149
-19
lines changed

3 files changed

+149
-19
lines changed

src/schemas/json/github-issue-forms.json

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,25 +2153,35 @@
21532153
},
21542154
"labels": {
21552155
"description": "An issue template labels\nhttps://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax",
2156-
"type": "array",
2157-
"minItems": 1,
2158-
"uniqueItems": true,
2159-
"items": {
2160-
"type": "string",
2161-
"minLength": 1,
2162-
"examples": [
2163-
"Sample label",
2164-
"bug",
2165-
"documentation",
2166-
"duplicate",
2167-
"enhancement",
2168-
"good first issue",
2169-
"help wanted",
2170-
"invalid",
2171-
"question",
2172-
"wontfix"
2173-
]
2174-
}
2156+
"oneOf": [
2157+
{
2158+
"type": "array",
2159+
"minItems": 1,
2160+
"uniqueItems": true,
2161+
"items": {
2162+
"type": "string",
2163+
"minLength": 1,
2164+
"examples": [
2165+
"Sample label",
2166+
"bug",
2167+
"documentation",
2168+
"duplicate",
2169+
"enhancement",
2170+
"good first issue",
2171+
"help wanted",
2172+
"invalid",
2173+
"question",
2174+
"wontfix"
2175+
]
2176+
}
2177+
},
2178+
{
2179+
"description": "Comma-delimited labels",
2180+
"type": "string",
2181+
"minLength": 1,
2182+
"examples": ["Sample label", "bug,documentation,duplicate"]
2183+
}
2184+
]
21752185
},
21762186
"projects": {
21772187
"description": "Projects that any issues created with this template will automatically be added to.",
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# yaml-language-server: $schema=../../schemas/json/github-issue-forms.json
2+
name: 🐞 Bug
3+
description: File a bug/issue
4+
title: '[BUG] <title>'
5+
labels: 'Bug,Needs Triage'
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the bug you encountered.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Current Behavior
17+
description: A concise description of what you're experiencing.
18+
validations:
19+
required: false
20+
- type: textarea
21+
attributes:
22+
label: Expected Behavior
23+
description: A concise description of what you expected to happen.
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Steps To Reproduce
29+
description: Steps to reproduce the behavior.
30+
placeholder: |
31+
1. In this environment...
32+
2. With this config...
33+
3. Run '...'
34+
4. See error...
35+
validations:
36+
required: false
37+
- type: textarea
38+
attributes:
39+
label: Environment
40+
description: |
41+
examples:
42+
- **OS**: Ubuntu 20.04
43+
- **Node**: 13.14.0
44+
- **npm**: 7.6.3
45+
value: |
46+
- OS:
47+
- Node:
48+
- npm:
49+
render: Markdown # markdown lower case is in the official example. But the schema only accept: Markdown
50+
validations:
51+
required: false
52+
- type: textarea
53+
attributes:
54+
label: Anything else?
55+
description: |
56+
Links? References? Anything that will give us more context about the issue you are encountering!
57+
58+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
59+
validations:
60+
required: false
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# yaml-language-server: $schema=../../schemas/json/github-issue-forms.json
2+
name: 🐞 Bug
3+
description: File a bug/issue
4+
title: '[BUG] <title>'
5+
labels: Bug
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the bug you encountered.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: textarea
15+
attributes:
16+
label: Current Behavior
17+
description: A concise description of what you're experiencing.
18+
validations:
19+
required: false
20+
- type: textarea
21+
attributes:
22+
label: Expected Behavior
23+
description: A concise description of what you expected to happen.
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Steps To Reproduce
29+
description: Steps to reproduce the behavior.
30+
placeholder: |
31+
1. In this environment...
32+
2. With this config...
33+
3. Run '...'
34+
4. See error...
35+
validations:
36+
required: false
37+
- type: textarea
38+
attributes:
39+
label: Environment
40+
description: |
41+
examples:
42+
- **OS**: Ubuntu 20.04
43+
- **Node**: 13.14.0
44+
- **npm**: 7.6.3
45+
value: |
46+
- OS:
47+
- Node:
48+
- npm:
49+
render: Markdown # markdown lower case is in the official example. But the schema only accept: Markdown
50+
validations:
51+
required: false
52+
- type: textarea
53+
attributes:
54+
label: Anything else?
55+
description: |
56+
Links? References? Anything that will give us more context about the issue you are encountering!
57+
58+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
59+
validations:
60+
required: false

0 commit comments

Comments
 (0)