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: configure renovate #7865

Merged
merged 11 commits into from Dec 7, 2020
28 changes: 21 additions & 7 deletions docs/usage/configure-renovate.md
Expand Up @@ -12,8 +12,8 @@ Once you have enabled Renovate on a repository, you will receive a "Configure Re
## No Risk Onboarding

Conveniently, Renovate will not make any changes to your repository or raise any further Pull Requests until after you _merge_ this initial Pull Request.
So if there is anything about the Pull Request that you don't like or understand, take your time to read [documentation](https://docs.renovatebot.com) or ask questions in one of our support forums and merge the PR only once you're satisfied with the result.
You can edit your Renovate configuration **within this `renovate/configure` branch** and Renovate will keep updating the description in the PR to match, so you can keep doing that until you're satisfied with the results.
If there is anything about the Pull Request that you don't like or understand, take your time to read the [documentation](https://docs.renovatebot.com) or ask questions in one of our support forums and merge the PR only once you're satisfied with the result.
You can edit your Renovate configuration **within the `renovate/configure` branch** and Renovate will keep updating the description in the PR to match, so you can keep doing that until you're satisfied with the results.

## Check for Warnings

Expand All @@ -23,9 +23,22 @@ If you do, then make them in your base branch (e.g. `master`) so that Renovate c
## Configuration Location

The Configure Renovate PR will include a `renovate.json` file in the root directory, with suggested default settings.
If you don't want a `renovate.json` file in your repository you can use one of the following files instead:

If you don't want to have an additional file (`renovate.json`) in your repository then you can instead add the same settings to a `"renovate"` section in your `package.json`, if you are already using this (e.g. JavaScript project).
Any settings made in `package.json` will apply to the whole project (including other, nested `package.json` files).
- `package.json`
- `.renovaterc`
- `.renovaterc.json`
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved

### package.json

You can add the same settings to a `"renovate"` section in your `package.json` file instead.
The `package.json` file must be located at the root of your repository. (I think this is what is intended, configure it in the root `package.json` which then also applies to other nested `package.json` files further in the directory structure)
HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved
This is handy if you are already using a `package.json` file anyway, e.g. when you're working on a JavaScript project.
The configuration in your `package.json` will apply to the whole project (this includes other, nested `package.json` files).

TODO: Maybe add link to section that explains the `"renovate"` section in the `package.json` file workflow?

HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved
### .renovaterc or .renovaterc.json

Alternatively, if you prefer to use "dot files" then you can add the same JSON configuration to either a `.renovaterc` file or `.renovaterc.json` file instead of `renovate.json`.

HonkingGoose marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -34,15 +47,16 @@ Alternatively, if you prefer to use "dot files" then you can add the same JSON c
Most of the settings in the `renovate.json` onboarding configuration are defaults, however usually this configuration file will have some default overrides in it, such as:

- Automatically enabling Angular-style semantic commits if your repository uses them
- Determining whether to use dependency range pinning depending on the detected project type
- Determining whether to use dependency range pinning depending on the detected project type (app vs library)

## Common Overrides

Please check the docs on this website for an exhaustive Configuration Reference, however here are some of the most commonly changed (overridden) configuration settings:
Please check the docs on this website for an exhaustive Configuration Reference.
To help you get started, here are some of the most commonly changed (overridden) configuration settings:

- **rangeStrategy**: By default (with zero config) it's `"replace"` however the `"config:base"` preset overrides it to `"auto"`. If you don't want to pin dependency versions and retain ranges, add the `":preserveSemverRanges"` preset to the `extends` array
- **labels**: Labels to assign to Pull Requests
- **assignees**: GitHub users to assign the Pull Requests to
- **assignees**: GitHub user(s) to assign the Pull Requests to

Renovate will update your PR description each time it finds changes.

Expand Down