There was still a lot of manual massaging of the script's
output that needed to happen before it was usable as a PR
to cncf/devstats.
I have now tried to encode as much of that knowledge in
code and comments here to allow the output of the script
to overwrite the existing file.
- add header/footer
- add comment pointing to this script
- add special case group for "Kubernetes"
- add support for committees that own code
- (manually) keep track of old repo names for history
The following formatting is enforced:
- Consistent identation of 2 spaces
- Keys are sorted by order of struct fields
- Lists are sorted by struct-dependent keys
- Comments are stripped
I had hopes of using yaml.Node to preserve comments, but found no
obvious way to marshal from struct to Node, meaning all data
manipulation had to be done against Nodes. This loses us all of the
benefits of using a struct: types, known fields, field order.
Given that there aren't many comments in sigs.yaml to begin with, I'm
erring on the side of dropping support for them.
When the hack/verify-generated-docs.sh job fails because a generated
file was edited instead of the sigs.yaml file, it is less than clear
from the error message that the user still needs to manually commit the
generated docs in addition to changing the sigs.yaml and validating that
the docs do build. A small additional bit of guidance is appended to
the existing hint in the test error output.
Signed-off-by: Tim Pepper <tpepper@vmware.com>