Skip to content
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

docs: update preset hosting docs #8591

Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 2 additions & 32 deletions docs/usage/config-presets.md
Expand Up @@ -119,39 +119,9 @@ Or if you think your preset would be valuable for others, please contribute a PR
If you manage multiple repositories using Renovate and want the same custom config across all or most of them, then you might want to consider publishing your own preset config so that you can "extend" it in every applicable repository.
That way when you want to change your Renovate configuration you can make the change in one location rather than having to copy/paste it to every repository individually.

Let's say that your username on npm and elsewhere is "fastcore".
In that case, you can choose between publishing your preset config package as `@fastcore/renovate-config` or `renovate-config-fastcore`.
Let's assume you choose `renovate-config-fastcore` as the package name:
## File based presets example

You then need to publish the `renovate-config-fastcore` package where the `package.json` contains the field `renovate-config` and then put your config under the field `default`.
For example:

```json
{
"name": "renovate-config-fastcore",
"version": "0.0.1",
...
"renovate-config": {
"default": {
"extends": ["config:base", "schedule:nonOfficeHours"]
}
}
}
```

Then in each of your repositories you can add your renovate config like:

```json
"extends": ["fastcore"]
```

Any repository including this config will then adopt the rules of the default `library` preset but schedule it on weeknights or weekends.

Note: if you prefer to publish using the namespace `@fastcore/renovate-config` then you would use the `@` prefix instead:

```json
"extends": ["@fastcore"]
```
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved
<!-- TODO: Explain how to use a file based preset here. -->
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved

## GitHub-hosted Presets

Expand Down