Skip to content

Commit d740767

Browse files
committed
Remove notes field from label configuration files
At the time the original configuration file was developed, it was in JSON, which does not support comments. I found the need to add some internal explanatory commentary to some of the labels, so I added an arbitrary `notes` key as a container for this information, and our JSON schema was also configured to accept this field. I later decided to convert the files to YAML, since that is the language used by the majority of the asset configuration files. At this point it became possible to use comments, but the `notes` field was already in place so it seemed pointless to change it. Validation of the configuration file was added to the "GitHub Label Sync" tool in the recent 2.1.0 release. Before 2.1.0, the tool ignored any additional properties in the label configuration objects. It now errors if there are any unexpected properties. This `notes` field now causes the configuration files that contain it to be considered invalid by the tool: ``` $ github-label-sync --labels https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/universal.yml per1234/some-repo Syncing labels for "per1234/some-repo" Validating provided labels Invalid label: {"name":"conclusion: moved","color":"940404","description":"Issue/PR moved to another repository","notes":"For use when it's not possible to do a true transfer\n(PRs, different organizations, or maintainer doesn't have write permissions in target repo).\n"} - must NOT have additional properties [...] ``` So the `notes` field is hereby removed, with the contents moved to comments.
1 parent 6546b24 commit d740767

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

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)