-
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
feat(config): Support presets in subdirectories #8724
feat(config): Support presets in subdirectories #8724
Conversation
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.
@rarkins I'm not sure if this is what we want. Currently we use the preset :name
as filename and we don't support sub-presets on those hosted presets. So why we don't simply use the all after the :
as path. Which needs to have an extension then, to support json5 or later maybe yaml
github>foo/bar:fruit/banana today already has a meaning: the file I think we can keep our convention of "no file extension implies |
so parse as follow?
|
I think forcing a separation between the path and filename with |
We need to maintain backwards compatibility at all costs here |
Once we are out of the root I think that having a filename specified as mandatory is an OK restriction |
so again, we need to decide, what happens when is |
I think best is to split this
|
Right now the I think the above idea could cause some confusion because it would overload the meaning of |
If it makes a difference for us, we could argue that when using paths, you don't need sub-presets. We also have documented
And I've got a feeling that
In fact I think it's this above one that has caused us to consider the |
Do we think that "no sub-presets if subdirectories are in use" is a reasonable limitation? |
I'm ok with no sub-preset support. But we should throw an config error if someone tries to do that. |
Yes, if they combine // with : then we should fail to parse it and throw |
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
That makes sense to me, but I'm not sure how that should be worded since subpresets aren't mentioned in the docs right now |
@HonkingGoose Do you have a suggestion ? 🙃 |
I think a note explaining what parts of the string are "repo", "path" and "subpreset" is OK for now, until we figure out more. I don't have a suggestion now, as I don't really understand what terms belong to which parts of the strings. 😄 |
@HonkingGoose @viceice |
@ArmaanT Looks like a bad rebase? I think you need to rebase and force push to clean this pr. |
Sorry about that @viceice, should be fixed now. |
🎉 This PR is included in version 24.91.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Changes:
This PR adds the ability to extend a config preset that exists within an arbitrary path inside another repo. The new syntax is:
github>user/repo//path/to/file
which will loadpath/to/file.json
within theuser/repo
repository.This new syntax is supported on
github
,gitlab
,gitea
, andlocal
(when on one of those platforms)Context:
Closes #8674
Documentation (please check one with an [x])
How I've tested my work (please tick one)
I have verified these changes via:
Here's the real repository I tested with. Here's a PR that was generated using an external preset config: ArmaanT/testbed#8.