Provide reusable presets for the most common dependency types in Gitea projects #97

Merged
lunny merged 5 commits from justusbunsi/renovate-config:reusable-presets into main 2023-12-26 03:11:39 +00:00
2 changed files with 40 additions and 0 deletions
Showing only changes of commit b62770c178 - Show all commits

@ -6,3 +6,28 @@ To host the renovate config.
- `renovate.json` in this repository ensures to receive Renovate updates.
- `default.json` holds the basic config for all repositories. It extends the presets by the renovate project defined in `renovate-schema.json`.
- Each repository can extend/alter this config by adding a `renovate.json` file to the root of the repository.
## Reusable presets
### Golang dependency group
What it does:
- Groups all Golang dependencies into one PR
- Respects your repository's `separateMajorMinor` setting[^1]
- Runs `go mod tidy` before committing to ensure a clean `go.sum`[^2]
Usage:
```diff
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"gitea>gitea/renovate-config",
+ "gitea>gitea/renovate-config:go-deps"
]
}
```
[^1]: [Renovate Docs: separateMajorMinor](https://docs.renovatebot.com/configuration-options/#separatemajorminor)
[^2]: [Renovate Docs: postUpdateOptions](https://docs.renovatebot.com/configuration-options/#postupdateoptions)

15
go-deps.json Normal file

@ -0,0 +1,15 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"gomod": {
"enabled": true
},
"postUpdateOptions": [
"gomodTidy"
],
"packageRules": [
{
"groupName": "Go dependencies",
"matchManagers": ["gomod"]
}
]
}