Merge pull request 'chore(renovate): move settings to shared go preset' (#5066) from viceice/forgejo:chore/renovate/moved-settings into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/5066
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Michael Kriese 2024-08-23 09:59:06 +00:00
commit 27de894a6d

View file

@ -1,13 +1,6 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [ "extends": ["local>forgejo/renovate-config"],
"config:best-practices",
":approveMajorUpdates",
":maintainLockFilesWeekly",
"schedule:daily",
"schedule:automergeDaily",
"local>forgejo-contrib/forgejo-renovate//go.json"
],
"ignorePresets": [ "ignorePresets": [
":semanticPrefixFixDepsChoreOthers", ":semanticPrefixFixDepsChoreOthers",
"docker:pinDigests", "docker:pinDigests",
@ -18,34 +11,15 @@
"/^v[7-9]\\.\\d+/forgejo$/", "/^v[7-9]\\.\\d+/forgejo$/",
"/^v\\d\\d+\\.\\d+\\/forgejo$/" "/^v\\d\\d+\\.\\d+\\/forgejo$/"
], ],
"semanticCommits": "disabled", "postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths", "npmDedupe"],
"automergeStrategy": "merge-commit",
"postUpdateOptions": [
"gomodTidy",
"gomodUpdateImportPaths",
"npmDedupe"
],
"prConcurrentLimit": 10, "prConcurrentLimit": 10,
"internalChecksFilter": "strict",
"osvVulnerabilityAlerts": true, "osvVulnerabilityAlerts": true,
"labels": [ "labels": ["dependency-upgrade"],
"dependency-upgrade"
],
"packageRules": [ "packageRules": [
{ {
"description": "Require approval for go and python minor version", "description": "Require approval for python minor version",
"matchDepNames": [ "matchDepNames": ["python"],
"code.forgejo.org/oci/golang", "matchUpdateTypes": ["minor"],
"docker.io/library/golang",
"docker.io/golang",
"go",
"golang",
"python",
"mcr.microsoft.com/devcontainers/go"
],
"matchUpdateTypes": [
"minor"
],
"dependencyDashboardApproval": true "dependencyDashboardApproval": true
}, },
{ {
@ -65,43 +39,23 @@
"github.com/google/pprof", "github.com/google/pprof",
"github.com/golangci/misspell/cmd/misspell" "github.com/golangci/misspell/cmd/misspell"
], ],
"extends": [ "extends": ["schedule:quarterly"]
"schedule:quarterly"
]
}, },
{ {
"description": "elasticsearch CI images are published about once a month and do not use semantic versioning or short tags", "description": "elasticsearch CI images are published about once a month and do not use semantic versioning or short tags",
"matchDepNames": [ "matchDepNames": ["elasticsearch"],
"elasticsearch" "extends": ["schedule:quarterly"]
],
"extends": [
"schedule:quarterly"
]
}, },
{ {
"description": "devcontainer is an optional tool used by some Forgejo contributors when working on the codebase", "description": "devcontainer is an optional tool used by some Forgejo contributors when working on the codebase",
"groupName": "devcontainer packages", "groupName": "devcontainer packages",
"extends": [ "extends": ["schedule:quarterly"],
"schedule:quarterly"
],
"automerge": true, "automerge": true,
"matchPackageNames": [ "matchPackageNames": [
"ghcr.io/devcontainers/features/**", "ghcr.io/devcontainers/features/**",
"ghcr.io/devcontainers-contrib/features/**" "ghcr.io/devcontainers-contrib/features/**"
] ]
}, },
{
"description": "Group golang packages",
"matchDepNames": [
"code.forgejo.org/oci/golang",
"docker.io/library/golang",
"docker.io/golang",
"go",
"golang",
"mcr.microsoft.com/devcontainers/go"
],
"groupName": "golang packages"
},
{ {
"description": "Group nodejs packages", "description": "Group nodejs packages",
"matchDepNames": [ "matchDepNames": [
@ -116,22 +70,10 @@
}, },
{ {
"description": "x/tools/* are used in the CI only and upgraded together", "description": "x/tools/* are used in the CI only and upgraded together",
"matchUpdateTypes": [ "matchUpdateTypes": ["minor", "patch", "digest"],
"minor",
"patch",
"digest"
],
"automerge": true, "automerge": true,
"groupName": "x/tools", "groupName": "x/tools",
"matchPackageNames": [ "matchPackageNames": ["golang.org/x/tools{/,}**"]
"golang.org/x/tools{/,}**"
]
},
{
"description": "Group linter minor and patch updates",
"extends": ["packages:linters"],
"matchUpdateTypes": ["minor", "patch"],
"groupName": "linters"
}, },
{ {
"description": "Group postcss minor and patch updates", "description": "Group postcss minor and patch updates",
@ -142,13 +84,7 @@
{ {
"description": "Split minor and patch updates", "description": "Split minor and patch updates",
"matchDepNames": [ "matchDepNames": [
"code.forgejo.org/oci/golang",
"docker.io/library/golang",
"docker.io/golang",
"github.com/urfave/cli/v2", "github.com/urfave/cli/v2",
"go",
"golang",
"mcr.microsoft.com/devcontainers/go",
"python", "python",
"swagger-ui-dist", "swagger-ui-dist",
"vue" "vue"
@ -157,37 +93,23 @@
}, },
{ {
"description": "Automerge patch updates", "description": "Automerge patch updates",
"matchDepNames": [ "matchDepNames": ["vue", "github.com/urfave/cli/v2", "swagger-ui-dist"],
"vue", "matchUpdateTypes": ["patch"],
"github.com/urfave/cli/v2",
"swagger-ui-dist"
],
"matchUpdateTypes": [
"patch"
],
"automerge": true "automerge": true
}, },
{ {
"description": "Automerge renovate updates", "description": "Automerge renovate updates",
"matchDatasources": [ "matchDatasources": ["docker"],
"docker"
],
"matchPackageNames": [ "matchPackageNames": [
"code.forgejo.org/forgejo-contrib/renovate", "code.forgejo.org/forgejo-contrib/renovate",
"ghcr.io/visualon/renovate" "ghcr.io/visualon/renovate"
], ],
"matchUpdateTypes": [ "matchUpdateTypes": ["minor", "patch", "digest"],
"minor",
"patch",
"digest"
],
"automerge": true "automerge": true
}, },
{ {
"description": "Add reviewer and additional labels to renovate PRs", "description": "Add reviewer and additional labels to renovate PRs",
"matchDatasources": [ "matchDatasources": ["docker"],
"docker"
],
"matchPackageNames": [ "matchPackageNames": [
"code.forgejo.org/forgejo-contrib/renovate", "code.forgejo.org/forgejo-contrib/renovate",
"ghcr.io/visualon/renovate" "ghcr.io/visualon/renovate"
@ -197,61 +119,18 @@
}, },
{ {
"description": "Update renovate with higher prio to come through rate limit", "description": "Update renovate with higher prio to come through rate limit",
"matchDatasources": [ "matchDatasources": ["docker"],
"docker"
],
"matchPackageNames": [ "matchPackageNames": [
"code.forgejo.org/forgejo-contrib/renovate", "code.forgejo.org/forgejo-contrib/renovate",
"ghcr.io/visualon/renovate" "ghcr.io/visualon/renovate"
], ],
"extends": [ "extends": ["schedule:weekly"],
"schedule:weekly"
],
"prPriority": 10, "prPriority": 10,
"reviewers": ["viceice"],
"addLabels": ["forgejo/ci", "test/not-needed"],
"groupName": "renovate" "groupName": "renovate"
}, },
{
"description": "Update go patch with higher prio to come through rate limit",
"matchDepNames": [
"go",
"golang",
"docker.io/golang",
"docker.io/library/golang"
],
"matchUpdateTypes": [
"patch"
],
"prPriority": 10,
"schedule": [
"at any time"
]
},
{
"description": "Bump go.mod directive versions",
"matchDatasources": ["golang-version"],
"matchManagers": ["gomod"],
"matchDepTypes": ["golang"],
"matchDepNames": ["go"],
"rangeStrategy": "bump"
},
{
"description": "Disable actions/cascading-pr for now <https://github.com/renovatebot/renovate/issues/28120>",
"matchDepNames": [
"actions/cascading-pr"
],
"matchManagers": [
"github-actions"
],
"enabled": false
},
{ {
"description": "Automerge some packages when CI succeeds", "description": "Automerge some packages when CI succeeds",
"extends": [ "extends": ["packages:linters", "packages:test"],
"packages:linters",
"packages:test"
],
"matchDepNames": [ "matchDepNames": [
"github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker", "github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker",
"github.com/golangci/golangci-lint/cmd/golangci-lint", "github.com/golangci/golangci-lint/cmd/golangci-lint",
@ -275,61 +154,34 @@
}, },
{ {
"description": "Hold back on some package updates for a few days", "description": "Hold back on some package updates for a few days",
"matchDepNames": [ "matchDepNames": ["monaco-editor"],
"monaco-editor"
],
"minimumReleaseAge": "30 days" "minimumReleaseAge": "30 days"
}, },
{ {
"description": "disallow `eslint-plugin-no-use-extend-native` v0.6.0+, requires eslint v9", "description": "disallow `eslint-plugin-no-use-extend-native` v0.6.0+, requires eslint v9",
"matchDepNames": [ "matchDepNames": ["eslint-plugin-no-use-extend-native"],
"eslint-plugin-no-use-extend-native"
],
"allowedVersions": "<0.6.0" "allowedVersions": "<0.6.0"
}, },
{ {
"description": "Require approval for stable branches (must be last rule to override all others)", "description": "Require approval for stable branches (must be last rule to override all others)",
"matchBaseBranches": [ "matchBaseBranches": ["/^v\\d+\\.\\d+\\/forgejo$/"],
"/^v\\d+\\.\\d+\\/forgejo$/"
],
"dependencyDashboardApproval": true, "dependencyDashboardApproval": true,
"schedule": [ "schedule": ["at any time"]
"at any time"
]
} }
], ],
"customManagers": [ "customManagers": [
{
"description": "Update go-version in forgejo workflows",
"customType": "regex",
"fileMatch": [
"^.forgejo/workflows/.+\\.yml$"
],
"matchStrings": [
"\\s+go-version: ['\"]?(?<currentValue>.+?)['\"]?\\s"
],
"depNameTemplate": "go",
"datasourceTemplate": "golang-version",
"versioningTemplate": "go-mod-directive"
},
{ {
"description": "Update node-version in forgejo workflows", "description": "Update node-version in forgejo workflows",
"customType": "regex", "customType": "regex",
"fileMatch": [ "fileMatch": ["^.forgejo/workflows/.+\\.yml$"],
"^.forgejo/workflows/.+\\.yml$" "matchStrings": ["\\s+node-version: ['\"]?(?<currentValue>.+?)['\"]?\\s"],
],
"matchStrings": [
"\\s+node-version: ['\"]?(?<currentValue>.+?)['\"]?\\s"
],
"depNameTemplate": "node", "depNameTemplate": "node",
"datasourceTemplate": "node-version" "datasourceTemplate": "node-version"
}, },
{ {
"description": "Update deps inside Makefile", "description": "Update deps inside Makefile",
"customType": "regex", "customType": "regex",
"fileMatch": [ "fileMatch": ["^Makefile$"],
"^Makefile$"
],
"matchStrings": [ "matchStrings": [
" \\?= (?<depName>.+?)@(?<currentValue>.+?) # renovate: datasource=(?<datasource>.+?)(?: packageName=(?<packageName>.+?))?( versioning=(?<versioning>.+?))?\\s" " \\?= (?<depName>.+?)@(?<currentValue>.+?) # renovate: datasource=(?<datasource>.+?)(?: packageName=(?<packageName>.+?))?( versioning=(?<versioning>.+?))?\\s"
] ]