Skip to content

Commit 4358838

Browse files
alan-agius4devversion
authored andcommitted
ci: add comprehensive configuration for renovate dependency automation
Introduce a Renovate configuration file with grouped update strategies, off-peak scheduling, semantic commit formatting, and workflow-specific rules. Key features include: - Grouping of non-major, Bazel, Angular, and TypeScript dependencies - Custom scheduling for weekdays and weekends in America/Tijuana timezone - PR concurrency and hourly limits to control Renovate behavior - Exclusion rules for placeholder versions and major updates on select packages - Enable lock file maintenance and use of semantic commit messages See associated pull request for more information.
1 parent d344104 commit 4358838

File tree

2 files changed

+157
-68
lines changed

2 files changed

+157
-68
lines changed

renovate-presets/default.json5

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": ["group:monorepos"],
4+
"dependencyDashboard": true,
5+
"rangeStrategy": "replace",
6+
7+
// Schedule Renovate to run during off-peak hours
8+
"schedule": [
9+
"after 10:00pm every weekday",
10+
"before 5:00am every weekday",
11+
"every weekend"
12+
],
13+
"prConcurrentLimit": 8,
14+
"prHourlyLimit": 4,
15+
"timezone": "America/Tijuana",
16+
17+
// Commit and PR customization
18+
"commitBody": "See associated pull request for more information.",
19+
"semanticCommits": "enabled",
20+
"semanticCommitScope": "",
21+
"semanticCommitType": "build",
22+
"labels": ["area: build & ci", "action: review"],
23+
24+
"lockFileMaintenance": {
25+
"enabled": true
26+
},
27+
28+
// Ignored dependencies in all repositories
29+
"ignoreDeps": [
30+
"build_bazel_rules_nodejs",
31+
"rules_pkg"
32+
],
33+
34+
"packageRules": [
35+
// ============================================================================
36+
// GENERAL GROUPING & UPDATE BEHAVIOR
37+
// ============================================================================
38+
39+
// Group all non-major updates (minor and patch) together
40+
{
41+
"groupName": "all non-major dependencies",
42+
"matchPackageNames": [
43+
"*",
44+
"!node",
45+
"!pnpm",
46+
"!npm",
47+
"!yarn"
48+
],
49+
"matchUpdateTypes": ["digest", "patch", "minor"]
50+
},
51+
52+
// ============================================================================
53+
// ECOSYSTEM-SPECIFIC GROUPING
54+
// ============================================================================
55+
56+
// Group Bazel updates
57+
{
58+
"groupName": "bazel dependencies",
59+
"matchManagers": ["bazel"]
60+
},
61+
62+
// ============================================================================
63+
// DEPENDENCY-SPECIFIC UPDATE CONTROLS
64+
// ============================================================================
65+
66+
// Group updates related to Angular ecosystem across repositories
67+
{
68+
"groupName": "cross-repo angular dependencies",
69+
"followTag": "next",
70+
"separateMajorMinor": false,
71+
"schedule": ["at any time"],
72+
"matchPackageNames": [
73+
"@angular-devkit/**",
74+
"@angular/**",
75+
"@schematics/**",
76+
"angular/**",
77+
"ng-packagr"
78+
]
79+
},
80+
81+
// Disable 'next' tag tracking on non-main branches
82+
{
83+
"matchBaseBranches": ["!main"],
84+
"followTag": null
85+
},
86+
87+
// Keep minor and patch updates separate for TypeScript
88+
{
89+
"matchPackageNames": ["typescript"],
90+
"separateMinorPatch": true
91+
},
92+
93+
// Group TypeScript-related packages
94+
{
95+
"groupName": "typescript dependencies",
96+
"matchPackageNames": ["typescript", "tslib"]
97+
},
98+
99+
// Limit how many times these packages get updated (They deploy each merged PR)
100+
{
101+
"matchPackageNames": ["renovate", "quicktype-core"],
102+
"schedule": ["on sunday and wednesday"]
103+
},
104+
105+
// ============================================================================
106+
// WORKFLOW-SPECIFIC UPDATE RULES
107+
// ============================================================================
108+
109+
// Group dependencies in the scorecard GitHub Actions workflow
110+
{
111+
"groupName": "scorecard action dependencies",
112+
"matchFileNames": [".github/workflows/scorecard.yml"],
113+
"matchPackageNames": ["*"]
114+
},
115+
116+
// ============================================================================
117+
// EXCLUSION RULES
118+
// ============================================================================
119+
120+
// Disable updates for placeholder or 0.0.0-style versions
121+
{
122+
"enabled": false,
123+
"matchCurrentVersion": "/^[~^]?0\\.0\\.0-/"
124+
},
125+
126+
// Disable major updates for specified dependencies
127+
{
128+
"enabled": false,
129+
"matchPackageNames": [
130+
"@types/node",
131+
"node",
132+
"npm",
133+
"pnpm",
134+
"rxjs",
135+
"tslib",
136+
"yarn"
137+
],
138+
"matchUpdateTypes": ["major"]
139+
},
140+
141+
// Disable TypeScript major and minor updates
142+
{
143+
"enabled": false,
144+
"matchPackageNames": ["typescript"],
145+
"matchUpdateTypes": ["major", "minor"]
146+
}
147+
]
148+
}

renovate.json

Lines changed: 9 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,23 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"semanticCommits": "enabled",
4-
"semanticCommitType": "build",
5-
"semanticCommitScope": "",
6-
"dependencyDashboard": true,
7-
"automerge": false,
8-
"separateMajorMinor": false,
9-
"timezone": "America/Tijuana",
10-
"labels": ["comp: build", "renovate managed", "action: merge"],
11-
"keepUpdatedLabel": "renovate managed",
12-
"rebaseWhen": "conflicted",
13-
"lockFileMaintenance": {
14-
"enabled": true
15-
},
16-
"ignorePaths": ["bazel/integration/tests/**"],
17-
"ignoreDeps": ["rules_pkg", "@angular-devkit/build-angular"],
18-
"baseBranches": ["main"],
3+
"extends": ["github>angular/dev-infra//renovate-presets/default.json5"],
4+
195
"postUpgradeTasks": {
206
"commands": [
21-
"git restore bazel/pnpm-lock.yaml",
22-
"yarn install",
7+
"git restore bazel/pnpm-lock.yaml .npmrc",
8+
"yarn install --immutable",
239
"yarn bazel sync --only=repo || true",
2410
"yarn update-generated-files"
2511
],
26-
"executionMode": "update"
12+
"executionMode": "branch"
2713
},
14+
15+
"ignorePaths": ["bazel/integration/tests/**"],
2816
"packageRules": [
2917
{
30-
"matchDepNames": ["node"],
31-
"matchUpdateTypes": ["minor", "patch"]
32-
},
33-
{
34-
"enabled": false,
35-
"matchDepNames": ["node"],
36-
"matchUpdateTypes": ["major"]
37-
},
38-
{
39-
"matchUpdateTypes": ["minor", "patch"],
40-
"groupName": "all non-major dependencies",
41-
"schedule": ["at any time"],
42-
"matchPackageNames": ["*"]
43-
},
44-
{
45-
"groupName": "bazel setup",
46-
"matchPackageNames": ["/^@bazel/.*/", "/^build_bazel.*/"]
47-
},
48-
{
49-
"groupName": "yarn",
50-
"matchPackageNames": ["/yarn.*/"]
51-
},
52-
{
53-
"groupName": "octokit dependencies",
54-
"matchPackageNames": ["@octokit/{/,}**"]
55-
},
56-
{
57-
"followTag": "next",
58-
"groupName": "angular dependencies",
59-
"matchPackageNames": ["@angular/{/,}**", "@angular-devkit{/,}**", "@schematics/{/,}**"]
60-
},
61-
{
62-
"matchPackageNames": "renovate",
63-
"schedule": ["after 10:00pm", "before 5:00am"]
64-
},
65-
{
18+
"enabled": true,
6619
"matchPackageNames": ["typescript"],
67-
"matchUpdateTypes": ["major"],
68-
"enabled": false
69-
},
70-
{
71-
"matchPackageNames": ["@types/node"],
72-
"matchUpdateTypes": ["major"],
73-
"enabled": false
74-
},
75-
{
76-
"matchFileNames": [".github/workflows/scorecard.yml"],
77-
"groupName": "scorecard action dependencies",
78-
"groupSlug": "scorecard-action",
79-
"matchPackageNames": ["*"]
20+
"matchUpdateTypes": ["minor"]
8021
}
8122
]
8223
}

0 commit comments

Comments
 (0)