-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: Renovate JSON schema allows invalid package rules #26484 #26560
Conversation
Can make it more specific for "packageRules" if that's required. |
@rarkins yeah, that's what I don't quite understand. For instance, "versioning" is not listed in the "packageRules" in Renovate configuration page but it is used in renovate.json for this repo. Does it mean that "versioning" hasn't been documented yet or something else? |
versioning is documented at the root level. There are some options which should exist only within the root, only within packageRules, or either is ok (such as |
is it safe to assume that whenever an option has |
globalOnly=true options cannot be used in repository config |
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.
Do not merge - broken
@rarkins is there a list of the options that can be used in both places or that can be used in only top-level? |
No |
Okies. It doesn't sound like you're interested in keeping public schema updated. I will close this PR and put the schema into our private repository so that we could use it instead of the public one. Should you need any help with the public schema, don't hesitate to at-mention me. |
Changes
JSON schema generated by
tools/docs/schema.ts
will now have additionaladditionalProperties: false
for arrays items which will prevent arbitrary configuration objects like{"foo": "bar"}
.Context
This change is a follow-up to discussion in #26484
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
Neither of those. I ran
pnpm release:prepare
and used the generated JSON schema fromtmp/docs/renovate-schema.json
in JSON schema validator. I took most of the examples from Renovate configuration page and made sure the JSON examples are still valid.