-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create script for updating lists of ecosystems #303
Conversation
d48da91
to
f101dc2
Compare
#292 (comment) made me think we should later expand
|
9e00109
to
b4c776b
Compare
b4c776b
to
b2252be
Compare
This reformates the JSON schema file to reduce the diff on #303 since currently there's a section that is incorrectly indented Signed-off-by: Gareth Jones <[email protected]>
Signed-off-by: Gareth Jones <[email protected]>
Signed-off-by: Gareth Jones <[email protected]>
Signed-off-by: Gareth Jones <[email protected]>
Signed-off-by: Gareth Jones <[email protected]>
Signed-off-by: Gareth Jones <[email protected]>
…ce in their descriptions Signed-off-by: Gareth Jones <[email protected]>
Signed-off-by: Gareth Jones <[email protected]>
b2252be
to
d2a227b
Compare
| Ecosystem | Description | | ||
| --------- |-----------------| | ||
| `AlmaLinux` | AlmaLinux package ecosystem; the `name` is the name of the source package. The ecosystem string might optionally have a `:<RELEASE>` suffix to scope the package to a particular AlmaLinux release. `<RELEASE>` is a numeric version. | ||
<!-- begin auto-generated ecosystems list --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a pointer to the source of truth for this in the comment? So that contributors know where to change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a little something - I don't think it's perfect but hopefully enough to unblock for now
(I imagine we can improve on this over time as we see how our usage of ecosystems.json
and co evolve)
55065b8
to
dae0386
Compare
Signed-off-by: Gareth Jones <[email protected]>
dae0386
to
babe4ca
Compare
Signed-off-by: Gareth Jones <[email protected]>
This introduces a new script to make it easier to ensure all "lists of ecosystems" within this codebase remain up to date, including:
docs/schema.md
osvschema
go bindings package #292validation/schema.json
(both the pattern and the enum being introduced in feat: create dedicated ecosystem name enum with all ecosystems #296)To make it a bit easier, I've introduced a top-level
ecosystems.json
which is a map of defined ecosystems and a markdown description, sorted alphabetically (which the script also ensures) - I felt this was easier than trying to extract the list from markdown or another source, though it does mean double quotes need to be manually escaped.I went with JSON as it can be read without requiring an external dependency, though if we use Python 3.11 we could switch to
toml
instead as that ships withtomllib
Example of the workflow output: