Skip to content

Commit 3b00a89

Browse files
committed
Add instructions for renovate.json
1 parent 5c2a4ba commit 3b00a89

3 files changed

Lines changed: 67 additions & 1 deletion

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
applyTo: "renovate.json"
3+
---
4+
# Renovate Config Conventions
5+
6+
## Valid JSON
7+
8+
File must be strictly valid JSON. No trailing commas. Validate with:
9+
10+
```shell
11+
npx --yes --package renovate -- renovate-config-validator
12+
```
13+
14+
## $schema
15+
16+
Top-level field must include schema reference:
17+
18+
```json
19+
{
20+
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
21+
}
22+
```
23+
24+
## customManagers
25+
26+
Each entry requires:
27+
28+
- `"customType": "regex"` — mandatory for all regex managers
29+
- `"description"` — short human-readable string. State what updated, where.
30+
31+
Example:
32+
33+
```json
34+
{
35+
"description": "Update NEO4J_VERSION constant in shell scripts",
36+
"customType": "regex",
37+
"fileMatch": ["^scripts/[^/]*\\.sh$"],
38+
"matchStrings": ["NEO4J_VERSION:-\\\"?(?<currentValue>.*?)\\\""]
39+
}
40+
```
41+
42+
## packageRules
43+
44+
Each entry requires:
45+
46+
- `"description"` — short human-readable string. Clarifies rule purpose.
47+
48+
Example:
49+
50+
```json
51+
{
52+
"description": "Keep Python ML libraries in sync",
53+
"matchDatasources": ["pypi"],
54+
"matchPackageNames": ["scikit-**", "umap-learn"],
55+
"groupName": "python-machine-learning-libs"
56+
}
57+
```
58+
59+
## Escaping
60+
61+
Use `\\` in `matchStrings` and `fileMatch`. Single `\` → invalid JSON.
62+
63+
- `.``\\.`
64+
- `"``\\\"`

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ Instruction files auto-applied per file type:
8787
| `CYPHER.md`, `SCRIPTS.md`, `ENVIRONMENT_VARIABLES.md` | [.github/instructions/generated-reference-docs.instructions.md](./.github/instructions/generated-reference-docs.instructions.md) |
8888
| `.github/skills/`, `.github/instructions/`, `AGENTS.md` | [.github/instructions/agent-files.instructions.md](./.github/instructions/agent-files.instructions.md) |
8989
| `.github/workflows/*.yml` | [.github/instructions/github-workflows.instructions.md](./.github/instructions/github-workflows.instructions.md) |
90+
| `renovate.json` | [.github/instructions/renovate.instructions.md](./.github/instructions/renovate.instructions.md) |
9091

9192
---
9293

renovate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
{
203203
"description": "Update conda packages in conda-environment.yml (conda packages only, pip block excluded)",
204204
"customType": "regex",
205-
"fileMatch": ["(^|/)conda-environment\.yml$"],
205+
"fileMatch": ["(^|/)conda-environment\\.yml$"],
206206
"matchStrings": [
207207
"\\s+-\\s+(?<depName>[\\w-]+)=(?<currentValue>[^\\s#=]+)[\\s#]+"
208208
],
@@ -212,6 +212,7 @@
212212
},
213213
{
214214
"description": "DISABLED Update pip nested packages inside conda-environment.yml.",
215+
"customType": "regex",
215216
"fileMatch": ["(^|/)conda-environment-temporarily-disabled\\.yml$"],
216217
"matchStrings": [
217218
"\\s+-\\s+(?<depName>[\\w-]+)==(?<currentValue>[^\\s#=]+)[\\s#]+"

0 commit comments

Comments
 (0)