Skip to content

Commit c3abaac

Browse files
committed
Remove notes field from label configuration file
At the time the reference 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, and by our custom JSON schema: ``` .github/label-configuration-files/labels.yml invalid [ { instancePath: '/0', schemaPath: '#/items/additionalProperties', keyword: 'additionalProperties', params: { additionalProperty: 'notes' }, message: 'must NOT have additional properties' }, { instancePath: '/1', schemaPath: '#/items/additionalProperties', keyword: 'additionalProperties', params: { additionalProperty: 'notes' }, message: 'must NOT have additional properties' } ] ``` So the `notes` field is hereby removed, with the contents moved to comments.
1 parent dbfbb1b commit c3abaac

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Used by the "Sync Labels" workflow
22
# See: https://github.com/Financial-Times/github-label-sync#label-config-file
33

4+
# Added by the "Close stale issues" workflow.
45
- name: "conclusion: stale"
56
color: "940404"
67
description: Closed due to lack of activity
7-
notes: |
8-
Added by the "Close stale issues" workflow.
8+
# Added by the "Close stale issues" workflow.
99
- name: "status: stale"
1010
color: "940404"
1111
description: Pending closure due to lack of activity
12-
notes: |
13-
Added by the "Close stale issues" workflow.

0 commit comments

Comments
 (0)