From 0ce6ff461be3061f5713b9596e0b90f19e8088d2 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:19:27 +0200 Subject: [PATCH 01/12] docs(presets): explain how to use presets --- docs/usage/key-concepts/presets.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index f6bf06d9b5991f..a68e222802d3bb 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -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 GitHub Action digests. +Instead of writing your own Renovate config, you search through Renovate's build-in presets. +You find the the `helpers:pinGitHubActionDigests` preset and add it to the `extends` array, like this: + +```json +{ + "extends": ["config:base", "helpers:pinGitHubActionDigests"], +} +``` + +Renovate now follows the rules for `config:base` plus the rules for `helpers:pinGitHubActionDigests`. + ## Managing config for many repositories If you manage Renovate for many repositories, then you should create a global preset configuration. From 32750b7b42df8a1349c7d1473b1471cf3109cbc4 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Sun, 16 Apr 2023 08:23:49 +0000 Subject: [PATCH 02/12] Link to preset page from preset config option --- docs/usage/configuration-options.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index a37bd906c287fd..a7554647c4475c 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -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. +Read the [Key concepts, how to use presets](../usage/key-concepts/presets.md/#how-to-use-presets) page to learn how to use presets. ## extractVersion From 57bcf9568cf2a26a3d31957c6ca7832311467d9f Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Sun, 16 Apr 2023 08:27:40 +0000 Subject: [PATCH 03/12] Lint fix --- docs/usage/key-concepts/presets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index a68e222802d3bb..1fad5e70727b85 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -24,7 +24,7 @@ You find the the `helpers:pinGitHubActionDigests` preset and add it to the `exte ```json { - "extends": ["config:base", "helpers:pinGitHubActionDigests"], + "extends": ["config:base", "helpers:pinGitHubActionDigests"] } ``` From 06f4805b0a5ef72ea6441ece388882649fefe3a8 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Sun, 16 Apr 2023 08:42:59 +0000 Subject: [PATCH 04/12] Small fixes --- docs/usage/configuration-options.md | 2 +- docs/usage/key-concepts/presets.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index a7554647c4475c..9ee97af6a33f9e 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -855,7 +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. -Read the [Key concepts, how to use presets](../usage/key-concepts/presets.md/#how-to-use-presets) page to learn how to use presets. +Learn how to use presets by reading the [Key concepts, Presets](../usage/key-concepts/presets.md/#how-to-use-presets) page. ## extractVersion diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index 1fad5e70727b85..c5b55f9603a51b 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -19,8 +19,8 @@ Use presets to: ## How to use presets Let's say you're using the `config:base` preset, and want to pin GitHub Action digests. -Instead of writing your own Renovate config, you search through Renovate's build-in presets. -You find the the `helpers:pinGitHubActionDigests` preset and add it to the `extends` array, like this: +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 { From 6dbbcbc4c961b57d934af076dc63cff613742370 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Sun, 16 Apr 2023 13:40:05 +0200 Subject: [PATCH 05/12] Update docs/usage/key-concepts/presets.md --- docs/usage/key-concepts/presets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index c5b55f9603a51b..2b38b783a71091 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -18,7 +18,7 @@ Use presets to: ## How to use presets -Let's say you're using the `config:base` preset, and want to pin GitHub Action digests. +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: From 3cc192e5b60e0d4730279021c917c3e9ed463cac Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:11:07 +0200 Subject: [PATCH 06/12] Add section about contributing presets --- docs/usage/key-concepts/presets.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index 2b38b783a71091..7bc6d6b9b14371 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -46,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 + +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. + ## Summary In short: From de56be39b7eb6b1eb3d5aa3a7a699b95b69ce71b Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:18:01 +0200 Subject: [PATCH 07/12] Last preset in array "wins" if there are conflicts --- docs/usage/key-concepts/presets.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index 7bc6d6b9b14371..80897bb0841df9 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -29,6 +29,7 @@ You find the the `helpers:pinGitHubActionDigests` preset and add it to the `exte ``` Renovate now follows the rules for `config:base` plus the rules for `helpers:pinGitHubActionDigests`. +If there is a logical conflict between presets, then the last preset in the array wins. ## Managing config for many repositories From a94264f4045a2458f5d9eca7e0028fd9a70fb96e Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 11:38:17 +0200 Subject: [PATCH 08/12] Direct help to discussion, link to contributing presets --- docs/usage/config-presets.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/usage/config-presets.md b/docs/usage/config-presets.md index b70a8f48bbabad..c2914823ce0988 100644 --- a/docs/usage/config-presets.md +++ b/docs/usage/config-presets.md @@ -164,7 +164,7 @@ In short, the number of `{{argx}}` parameters in the definition is how many para Parameters must be strings, non-quoted, and separated by commas if there are more than one. If you find that you are repeating config a lot, you might consider publishing one of these types of parameterised presets yourself. -Or if you think your preset would be valuable for others, please contribute a PR to the Renovate repository. +Or if you think your preset would be valuable for others, please contribute a PR to the Renovate repository, see [Contributing to presets](#contributing-to-presets). ## GitHub-hosted Presets @@ -213,6 +213,8 @@ Renovate will determine the current platform and look up the preset from there. Have you configured a rule that you think others might benefit from? Please consider contributing it to the [Renovate repository](https://github.com/renovatebot/renovate/tree/main/lib/config/presets/internal) so that it gains higher visibility and saves others from reinventing the same thing. +If you need help with putting your preset into the Renovate code, open a [discussion](https://github.com/renovatebot/renovate/discussions). + ## Organization level presets Whenever repository onboarding happens, Renovate checks if the current user/group/org has a default config to extend. From 990803ad13376b45c986051fb912ab1373129305 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:10:11 +0200 Subject: [PATCH 09/12] Update docs/usage/config-presets.md --- docs/usage/config-presets.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/usage/config-presets.md b/docs/usage/config-presets.md index c2914823ce0988..0afcd775de8299 100644 --- a/docs/usage/config-presets.md +++ b/docs/usage/config-presets.md @@ -213,7 +213,8 @@ Renovate will determine the current platform and look up the preset from there. Have you configured a rule that you think others might benefit from? Please consider contributing it to the [Renovate repository](https://github.com/renovatebot/renovate/tree/main/lib/config/presets/internal) so that it gains higher visibility and saves others from reinventing the same thing. -If you need help with putting your preset into the Renovate code, open a [discussion](https://github.com/renovatebot/renovate/discussions). +Create a [discussion](https://github.com/renovatebot/renovate/discussions) to propose your preset to the Renovate maintainers. +The maintainers can also help improve the preset, and let you know where to put it in the code. ## Organization level presets From 88abd98e68c1ef12db9490d50a39cc70eaf29016 Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:12:05 +0200 Subject: [PATCH 10/12] Update docs/usage/key-concepts/presets.md Co-authored-by: Michael Kriese --- docs/usage/key-concepts/presets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/key-concepts/presets.md b/docs/usage/key-concepts/presets.md index 80897bb0841df9..f786f901e18730 100644 --- a/docs/usage/key-concepts/presets.md +++ b/docs/usage/key-concepts/presets.md @@ -51,7 +51,7 @@ Once you find a preset you like, put it in an `extends` array in your config fil 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. +Read [Contributing to presets](./config-presets.md#contributing-to-presets) to learn how. ## Summary From f40f67b6965eefe3e98cea9d024a431b4fc167ee Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:12:47 +0200 Subject: [PATCH 11/12] Update docs/usage/configuration-options.md Co-authored-by: Michael Kriese --- docs/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index f1a43a3e010719..28636c1a8ced0c 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -855,7 +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. -Learn how to use presets by reading the [Key concepts, Presets](../usage/key-concepts/presets.md/#how-to-use-presets) page. +Learn how to use presets by reading the [Key concepts, Presets](./key-concepts/presets.md/#how-to-use-presets) page. ## extractVersion From 9c9f016269fa2081550b6eb5ff8c26aed379236c Mon Sep 17 00:00:00 2001 From: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:13:18 +0200 Subject: [PATCH 12/12] Update docs/usage/configuration-options.md Co-authored-by: Michael Kriese --- docs/usage/configuration-options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 28636c1a8ced0c..775d6aad22d333 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -854,7 +854,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. +See [shareable config presets](./config-presets.md) for details. Learn how to use presets by reading the [Key concepts, Presets](./key-concepts/presets.md/#how-to-use-presets) page. ## extractVersion