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: explain how to use presets #21534

Merged
merged 13 commits into from
Apr 17, 2023
Merged
1 change: 1 addition & 0 deletions docs/usage/configuration-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ The above would mean Renovate would not include files matching the above glob pa
## extends

See [shareable config presets](https://docs.renovatebot.com/config-presets) for details.
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved
Learn how to use presets by reading the [Key concepts, Presets](../usage/key-concepts/presets.md/#how-to-use-presets) page.
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved

## extractVersion

Expand Down
20 changes: 20 additions & 0 deletions docs/usage/key-concepts/presets.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ Use presets to:
- Share your configuration with others
- Use somebody else's configuration and extend it with your own rules

## How to use presets

Let's say you're using the `config:base` preset, and want to pin your GitHub Action digests.
Instead of writing your own Renovate config, you search through Renovate's built-in presets.
You find the the `helpers:pinGitHubActionDigests` preset and add it to the `extends` array:

```json
{
"extends": ["config:base", "helpers:pinGitHubActionDigests"]
}
```

Renovate now follows the rules for `config:base` plus the rules for `helpers:pinGitHubActionDigests`.
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved

## Managing config for many repositories

If you manage Renovate for many repositories, then you should create a global preset configuration.
Expand All @@ -32,6 +46,12 @@ Renovate comes with a lot of built-in presets that you can use.
Browse [Renovate's default presets](https://docs.renovatebot.com/presets-default/) to find any that are useful to you.
Once you find a preset you like, put it in an `extends` array in your config file.

### Contributing a new built-in preset
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved

If you have a Renovate config that may help others, you can put it into Renovate's built-in presets.

Read [Contributing to presets](https://docs.renovatebot.com/config-presets/#contributing-to-presets) to learn how.
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved

## Summary

In short:
Expand Down