Description
Right now there are multiple places that somewhat capture the label and subsystem metadata in this repo:
In core-validate-commit:
In github-bot:
And of course the source of truth about labels is https://github.com/nodejs/node/labels
There is also discussion about automation of pinging teams, similar to how the now-removed CODEOWNERS file used to work (because the GitHub implementation didn't actually work for us). But to implement any of that, we will need this information actually written down somewhere in some format
Also related: Store list of collaborators and TSC in a JSON file #23623
Note that one of the reasons that CODEOWNERS is removed is that the pinging only worked for teams who have write access to this repo, and in core there are two type of groups we need to ping: WGs or teams whose members may or may not have write access but need to be informed (observers), and collaborators who tend to review the files more often than the others (owners).
At a glance, I think the information is basically a mapping of file_pattern -> (subsystem, owners[], observers[], labels[])
- but maybe there is more e.g. precedence and hierarchy. (note that subsystems are not equivalent to labels, as labels can be dont-land-*
)
I propose to put this information in this repo, and then we could figure out how to utilize it for automation - but it still has value even just as a general dictionary to look things up, even for humans.
On the automation's side - we could use it to ping people (or just suggest to you who to ping without actually pinging them so you don't accidentally create noise), to request reviews, to check reviews when landing PRs, to make sure the labels and their descriptions are not out of date, to dynamically introduce new subsystems in commit messages (to validate) etc. More importantly we can introduce new meta information and remove them by submitting PRs to these meta files instead of updating all the relevant projects (e.g. the bot doesn't know about all the files and the dont-land labels there are really out of date. If it just grabs the information from the master, we are more likely to keep the information up-to-date).
I don't know if there is a particularly good format, maybe a JSON or YAML? Or a variant of the removed CODEOWNERS (see #21161) file?
For reference, WPT uses a META.yml, v8 uses OWNERS, both seem to be home-grown files placed in different level of directories.