Skip to content

Commit e175ec0

Browse files
committed
Introduce renovate
The configuration is relatively simple: automerge minor+patch updates and all GH action updates as soon as the updates are available. Exception is the awssdk, which has daily releases, so it's limited to "once per week". For posterity, the config to let Renovate work against version-branches, restricted to patch-version bumps.
1 parent 8f14363 commit e175ec0

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/renovate.json5

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
{
20+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
21+
extends: [
22+
"config:base",
23+
// Required to not pin dependencies to _exact_ versions (pip)
24+
":preserveSemverRanges",
25+
"group:monorepos",
26+
"helpers:pinGitHubActionDigests",
27+
":semanticPrefixFixDepsChoreOthers",
28+
":dependencyDashboard",
29+
],
30+
31+
// Added for posterity how to let Renovate manage version-branches
32+
baseBranches: ["main", "/^release\\/.*/"],
33+
additionalBranchPrefix: "{{baseBranch}}/",
34+
commitMessagePrefix: "{{baseBranch}}: ",
35+
36+
pip_requirements: {
37+
// fileMatch default: (^|/)([\\w-]*)requirements\\.(txt|pip)$
38+
"fileMatch": ["(^|/)([\\w-]*)requirements.*\\.txt$"],
39+
},
40+
41+
packageRules: [
42+
{
43+
matchManagers: ["github-actions"],
44+
matchUpdateTypes: ["major", "minor", "patch", "digest"],
45+
automerge: true,
46+
platformAutomerge: true,
47+
},
48+
49+
// Check for updates, merge automatically
50+
{
51+
matchManagers: ["gradle", "gradle-wrapper", "pip_requirements", "pip_setup", "dockerfile", "devcontainer", "docker-compose"],
52+
matchUpdateTypes: ["minor", "patch"],
53+
automerge: true,
54+
platformAutomerge: true,
55+
},
56+
57+
// Check for major updates, but do not merge automatically
58+
{
59+
matchManagers: ["gradle", "gradle-wrapper", "pip_requirements", "pip_setup", "dockerfile", "devcontainer", "docker-compose"],
60+
matchUpdateTypes: ["major"],
61+
automerge: false,
62+
},
63+
64+
// Reduce awssdk update frequency noise (awssdk has daily releases)
65+
{
66+
matchManagers: ["gradle"],
67+
matchPackagePrefixes: ["software.amazon.awssdk"],
68+
extends: ["schedule:weekly"],
69+
},
70+
71+
// Turn off major & minor version updates on version-branches
72+
{
73+
matchBaseBranches: ["/^release/.*/"],
74+
matchUpdateTypes: ["major", "minor"],
75+
enabled: false
76+
},
77+
],
78+
79+
// Max 50 PRs in total, 5 per hour
80+
prConcurrentLimit: 50,
81+
prHourlyLimit: 5,
82+
}

0 commit comments

Comments
 (0)