Skip to content

Commit fac9e8f

Browse files
authored
Merge pull request #214 from per1234/valid-label-configs
Remove `notes` from allowed properties in label configuration schema
2 parents cd46ec4 + d740767 commit fac9e8f

File tree

3 files changed

+33
-27
lines changed

3 files changed

+33
-27
lines changed

workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,21 @@
99
"type": "object",
1010
"properties": {
1111
"name": {
12-
"type": "string",
13-
"maxLength": 50,
14-
"anyOf": [
12+
"allOf": [
1513
{
16-
"$comment": "Standardized label format",
17-
"pattern": "^.+: .+$"
14+
"$ref": "#/$defs/name_base"
1815
},
1916
{
20-
"$comment": "Allowed exceptions to the standardized format",
21-
"enum": ["help wanted"]
17+
"anyOf": [
18+
{
19+
"$comment": "Standardized label format",
20+
"pattern": "^.+: .+$"
21+
},
22+
{
23+
"$comment": "Allowed exceptions to the standardized format",
24+
"enum": ["help wanted"]
25+
}
26+
]
2227
}
2328
]
2429
},
@@ -45,14 +50,20 @@
4550
"maxLength": 100
4651
},
4752
"aliases": {
48-
"type": "array"
49-
},
50-
"notes": {
51-
"type": "string",
52-
"minLength": 1
53+
"type": "array",
54+
"items": {
55+
"$ref": "#/$defs/name_base"
56+
}
5357
}
5458
},
5559
"additionalProperties": false,
5660
"required": ["name", "color", "description"]
61+
},
62+
"$defs": {
63+
"name_base": {
64+
"$comment": "Fundamental requirements",
65+
"type": "string",
66+
"maxLength": 50
67+
}
5768
}
5869
}

workflow-templates/assets/sync-labels/tooling.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
- name: "architecture: arm"
2020
color: ff00ff
2121
description: Specific to ARM host architecture
22+
# Vulnerability disclosures are made following the procedure at:
23+
# https://github.com/arduino/.github/blob/master/SECURITY.md
2224
- name: "topic: security"
2325
color: ff0000
2426
description: Related to the protection of user data
25-
notes: |
26-
Vulnerability disclosures are made following the procedure at:
27-
https://github.com/arduino/.github/blob/master/SECURITY.md

workflow-templates/assets/sync-labels/universal.yml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@
2222
- name: "conclusion: off topic"
2323
color: "ff0000"
2424
description: Off topic for this repository
25+
# For use when it's not possible to do a true transfer
26+
# (PRs, different organizations, or maintainer doesn't have write permissions in target repo).
2527
- name: "conclusion: moved"
2628
color: "940404"
2729
description: Issue/PR moved to another repository
28-
notes: |
29-
For use when it's not possible to do a true transfer
30-
(PRs, different organizations, or maintainer doesn't have write permissions in target repo).
3130
- name: "conclusion: resolved"
3231
color: "00ff00"
3332
description: Issue was resolved
@@ -43,11 +42,10 @@
4342
- name: "criticality: low"
4443
color: "c0c0c0"
4544
description: Of low impact
45+
# Distinct from the criticality labels in that priority is assigned based on estimated effort in addition to impact.
4646
- name: "priority: high"
4747
color: "ffa200"
4848
description: Resolution is a high priority
49-
notes: |
50-
Distinct from the criticality labels in that priority is assigned based on estimated effort in addition to impact.
5149
- name: "priority: medium"
5250
color: "ffff00"
5351
description: Resolution is a medium priority
@@ -72,12 +70,11 @@
7270
- name: "status: blocked"
7371
color: "940404"
7472
description: Progress on this prevented by an external cause
73+
# Ideally this would be "status: help wanted", but GitHub gives this label special treatment so it's best to leave it
74+
# stock.
7575
- name: help wanted
7676
color: "ffa200"
7777
description: Assistance from the community is especially welcome
78-
notes: |
79-
Ideally this would be "status: help wanted", but GitHub gives this label special treatment so it's best to leave it
80-
stock.
8178
- name: "topic: infrastructure"
8279
color: "00ffff"
8380
description: Related to repository infrastructure
@@ -89,22 +86,21 @@
8986
description: Related to documentation for the project
9087
aliases:
9188
- documentation
89+
# This includes bugs, but avoids confusion for use in non-code contexts.
9290
- name: "type: imperfection"
9391
color: "ff0000"
9492
description: Perceived defect in any part of project
9593
aliases:
9694
- bug
97-
notes: This includes bugs, but avoids confusion for use in non-code contexts.
9895
- name: "type: enhancement"
9996
color: "008000"
10097
description: Proposed improvement
10198
aliases:
10299
- enhancement
100+
# All support request issues must be closed as "conclusion: invalid", redirecting the user to the Arduino forum, but
101+
# it's still useful to label the closed issues and this type doesn't fit into the imperfection/enhancement dichotomy.
103102
- name: "type: support"
104103
color: "ff0000"
105104
description: "OT: Request for help using the project"
106105
aliases:
107106
- question
108-
notes: |
109-
All support request issues must be closed as "conclusion: invalid", redirecting the user to the Arduino forum, but
110-
it's still useful to label the closed issues and this type doesn't fit into the imperfection/enhancement dichotomy.

0 commit comments

Comments
 (0)