Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
49faa29b
Unverified
Commit
49faa29b
authored
9 months ago
by
HonkingGoose
Committed by
GitHub
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
docs(key-concepts/presets): rewrite (#31358)
parent
fad3dc88
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/usage/key-concepts/presets.md
+25
-18
25 additions, 18 deletions
docs/usage/key-concepts/presets.md
with
25 additions
and
18 deletions
docs/usage/key-concepts/presets.md
+
25
−
18
View file @
49faa29b
...
...
@@ -12,15 +12,15 @@ To learn how to create your own presets, how to host them, and how to extend fro
Use presets to:
-
Set up the bot with good default settings
-
Reduce
duplicati
on of
your configuration
-
Avoid
duplicati
ng
your configuration
-
Share your configuration with others
-
Use somebody else's configuration a
nd
extend it with your own rules
-
Use somebody else's configuration a
s-is, or
extend it with your own rules
## How to use presets
Let's s
ay you're using the
`config:recommended`
preset, and want to pin your GitHub Action digests.
Instead of writing your own Renovate config, you search th
rough Renovate's built-in
preset
s
.
You find the the
`helpers:pinGitHubActionDigests`
preset and add i
t to the
`extends`
array:
S
ay you're using the
`config:recommended`
preset, and want to pin your GitHub Action digests.
Instead of writing your own Renovate config, you search th
e docs, and find the
`helpers:pinGitHubActionDigests`
preset.
Then you add the prese
t to the
`
"
extends
"
`
array
in your Renovate configuration file
:
```
json
{
...
...
@@ -28,35 +28,42 @@ You find the the `helpers:pinGitHubActionDigests` preset and add it to the `exte
}
```
Renovate now follows the rules for
`config:recommended`
plus the rules for
`helpers:pinGitHubActionDigests`
.
If there is a logical conflict between presets, then the last preset in the array wins.
In the example above, Renovate follows the rules from the
`config:recommended`
preset, plus the rules for
`helpers:pinGitHubActionDigests`
.
<!-- prettier-ignore -->
!!! tip
If there is a logical conflict between presets, then the _last_ preset in the
`"extends"`
array "wins".
## Managing config for many repositories
If you manage Renovate for many repositories, then you should create a global preset configuration.
Then you extend the global preset in each repository.
This way you have all global configuration in a single file, in a single repository.
If you manage the Renovate configuration for many repositories, we recommend that you:
1.
Create a global preset configuration
1.
Extend from the global preset in all of the repositories that should use your global preset as base
This way, when you want to change your global Renovate configuration, you only need to edit the global preset file.
## Presets are modular
Preset configs are modular
, they
can be as small
as a single package rule or as large as an entire configuration
.
This is similar to the way you can share ESLint configuration
s.
Preset configs are modular
: a preset
can be as small
or large as you need
.
A preset can even extend from _other_ preset
s.
## Built-in presets
Renovate comes with
a lot of
built-in presets
that you can use
.
B
rowse
[
Renovate's default presets
](
../presets-default.md
)
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.
Renovate comes with
many
built-in presets.
We recommend you b
rowse
[
Renovate's default presets
](
../presets-default.md
)
.
Again, to use the preset: add it to the
`
"
extends
"
`
array in your
Renovate
config file.
### Contributing a new built-in preset
If you have a Renovate config that may help others, you can put it into Renovate's built-in presets.
Read
[
Contributing to presets
](
../config-presets.md#contributing-to-presets
)
to learn how.
## Summary
In short:
-
Browse
[
Renovate's default presets
](
../presets-default.md
)
to find any that are useful to you
-
Publish your own if you wish to reuse them across repositories
-
Browse
[
Renovate's default presets
](
../presets-default.md
)
, or our other presets, to find helpful presets
-
Use presets by putting them in the
`"extends"`
array in your Renovate config file
-
To manage the Renovate configuration for many repositories at once, create a global preset config file
-
The order of presets matters: in a logical conflict, the last preset in the
`"extends"`
array "wins"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment