Skip to content

Commit cf09d2a

Browse files
authored
Improve Renovate configuration, add pre-commit hooks to validate Renovate configuration (#16330)
* Improve Renovate configuration * Validate Renovate and GitHub workflow configuration * Update .github/renovate.json5
1 parent 80804c0 commit cf09d2a

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

.github/renovate.json5

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"dependencyDashboard": true,
44
"suppressNotifications": ["prEditedNotification"],
5-
"extends": ["config:recommended", "helpers:pinGitHubActionDigests"],
5+
"extends": [
6+
"config:recommended",
7+
"helpers:pinGitHubActionDigestsToSemver",
8+
"replacements:all",
9+
"abandonments:recommended"
10+
],
11+
"configMigration": true,
612
"labels": ["bot: dependencies"],
7-
"rebaseLabel": ["bot: rebase"],
13+
"rebaseLabel": "bot: rebase",
814
"semanticCommits": "disabled",
915
"separateMajorMinor": false,
1016
"prHourlyLimit": 10,
@@ -15,7 +21,13 @@
1521
"pre-commit": {
1622
"enabled": true
1723
},
24+
"minimumReleaseAge": "7 days",
1825
"packageRules": [
26+
{
27+
// Pin versions already in use without waiting for the upgrade cooldown.
28+
"matchUpdateTypes": ["pinDigest"],
29+
"minimumReleaseAge": null
30+
},
1931
{
2032
groupName: "GitHub Actions",
2133
matchManagers: ["github-actions"],

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ repos:
1010
- id: mixed-line-ending
1111
args: [--fix=lf]
1212
- id: check-case-conflict
13+
- repo: https://github.com/python-jsonschema/check-jsonschema
14+
rev: 12e63946db2c5cfcc9030fac21c3883ba88c6ed8 # frozen: 0.38.0
15+
hooks:
16+
- id: check-github-workflows
17+
- id: check-renovate
18+
additional_dependencies: ["json5==0.15.0"]
1319
- repo: https://github.com/astral-sh/ruff-pre-commit
1420
# The Ruff version must match requirements-tests.txt.
1521
rev: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 # frozen: v0.15.20

0 commit comments

Comments
 (0)