Skip to content

Commit 34de655

Browse files
authored
ci(renovate): replace renovate config with starflow (canonical#2075)
This uses the starflow renovate configuration rather than having our own.
1 parent fae36fd commit 34de655

File tree

1 file changed

+1
-185
lines changed

1 file changed

+1
-185
lines changed

.github/renovate.json5

Lines changed: 1 addition & 185 deletions
Original file line numberDiff line numberDiff line change
@@ -1,187 +1,3 @@
11
{
2-
// Configuration file for RenovateBot: https://docs.renovatebot.com/configuration-options
3-
extends: ["config:recommended", ":semanticCommitTypeAll(build)"],
4-
ignoreDeps: [
5-
// Each ignore is probably connected with an ignore in pyproject.toml.
6-
// Ensure you change this and those simultaneously.
7-
"urllib3",
8-
// Temporary until we remove Windows. https://github.com/canonical/charmcraft/issues/1810
9-
"windows", // We'll update Windows versions manually.
10-
"tox-gh", // As of 1.3.2 tox-gh doesn't support Windows 2019's python 3.7.
11-
],
12-
labels: ["dependencies"], // For convenient searching in GitHub
13-
baseBranches: ["$default", "/^hotfix\\/.*/"],
14-
pip_requirements: {
15-
fileMatch: ["^tox.ini$", "(^|/)requirements([\\w-]*)\\.txt$", "^.pre-commit-config.yaml$"]
16-
},
17-
packageRules: [
18-
{
19-
// Internal package minor patch updates get top priority, with auto-merging
20-
groupName: "internal package minor releases",
21-
matchPackagePatterns: ["^craft-.*"],
22-
matchUpdateTypes: ["minor", "patch", "pin", "digest"],
23-
prPriority: 10,
24-
automerge: true,
25-
minimumReleaseAge: "0 seconds",
26-
schedule: ["at any time"],
27-
matchBaseBranches: ["$default"], // Only do minor releases on main
28-
},
29-
{
30-
// Same as above, but for hotfix branches, only for patch, and without auto-merging.
31-
groupName: "internal package patch releases (hotfix)",
32-
matchPackagePatterns: ["^craft-.*"],
33-
matchUpdateTypes: ["patch", "pin", "digest"],
34-
prPriority: 10,
35-
minimumReleaseAge: "0 seconds",
36-
schedule: ["at any time"],
37-
matchBaseBranches: ["/^hotfix\\/.*/"], // All hotfix branches
38-
},
39-
{
40-
// Automerge patches, pin changes and digest changes.
41-
// Also groups these changes together.
42-
groupName: "bugfixes",
43-
excludeDepPatterns: [
44-
"lint/.*",
45-
"types/.*",
46-
"pyright", // Pyright needs to be done separately.
47-
],
48-
matchUpdateTypes: ["patch", "pin", "digest"],
49-
prPriority: 3, // Patches should go first!
50-
automerge: true
51-
},
52-
{
53-
// Update all internal packages in one higher-priority PR
54-
groupName: "internal packages",
55-
matchDepPatterns: ["craft-.*", "snap-.*"],
56-
matchCategories: ["python"],
57-
prPriority: 2,
58-
matchBaseBranches: ["$default"], // Not for hotfix branches
59-
},
60-
{
61-
// GitHub Actions are higher priority to update than most dependencies since they don't tend to break things.
62-
groupName: "GitHub Actions",
63-
matchManagers: ["github-actions"],
64-
prPriority: 1,
65-
automerge: true,
66-
},
67-
// Everything not in one of these rules gets priority 0 and falls here.
68-
{
69-
//Do all pydantic-related updates together
70-
groupName: "pydantic etc.",
71-
matchPackagePatterns: ["^pydantic"],
72-
},
73-
{
74-
// Minor changes can be grouped and automerged for dev dependencies, but are also deprioritised.
75-
groupName: "development dependencies (non-major)",
76-
groupSlug: "dev-dependencies",
77-
matchDepPatterns: [
78-
"dev/.*",
79-
"lint/.*",
80-
"types/.*"
81-
],
82-
matchPackagePatterns: [
83-
// Brought from charmcraft. May not be complete.
84-
// This helps group dependencies in requirements-dev.txt files.
85-
"^(.*/)?autoflake$",
86-
"^(.*/)?black$",
87-
"^(.*/)?codespell$",
88-
"^(.*/)?coverage$",
89-
"^(.*/)?flake8$",
90-
"^(.*/)?hypothesis$",
91-
"^(.*/)?mypy$",
92-
"^(.*/)?pycodestyle$",
93-
"^(.*/)?docstyle$",
94-
"^(.*/)?pyfakefs$",
95-
"^(.*/)?pyflakes$",
96-
"^(.*/)?pylint$",
97-
"^(.*/)?pytest",
98-
"^(.*/)?responses$",
99-
"^(.*/)?ruff$",
100-
"^(.*/)?twine$",
101-
"^(.*/)?tox$",
102-
"^(.*/)?types-",
103-
],
104-
matchUpdateTypes: ["minor", "patch", "pin", "digest"],
105-
prPriority: -1,
106-
automerge: true
107-
},
108-
{
109-
// Documentation related updates
110-
groupName: "documentation dependencies",
111-
groupSlug: "doc-dependencies",
112-
matchPackageNames: ["Sphinx", "furo"],
113-
matchPackagePatterns: ["[Ss]phinx.*$"],
114-
matchDepPatterns: ["docs/.*"],
115-
matchBaseBranches: ["$default"], // Not for hotfix branches
116-
},
117-
{
118-
// Other major dependencies get deprioritised below minor dev dependencies.
119-
matchUpdateTypes: ["major"],
120-
prPriority: -2,
121-
matchBaseBranches: ["$default"], // Not for hotfix branches
122-
},
123-
{
124-
// Major dev dependencies are stone last, but grouped.
125-
groupName: "development dependencies (major versions)",
126-
groupSlug: "dev-dependencies",
127-
matchDepTypes: ["devDependencies"],
128-
matchUpdateTypes: ["major"],
129-
prPriority: -3,
130-
matchBaseBranches: ["$default"], // Not for hotfix branches
131-
matchPackagePatterns: [
132-
// Generated from the dependency dashboard, may not be complete.
133-
"^(.*/)?autoflake$",
134-
"^(.*/)?black$",
135-
"^(.*/)?flake8$",
136-
"^(.*/)?hypothesis$",
137-
"^(.*/)?pycodestyle$",
138-
"^(.*/)?pyfakefs$",
139-
"^(.*/)?pyflakes$",
140-
"^(.*/)?pylint$",
141-
"^(.*/)?pytest",
142-
"^(.*/)?responses$",
143-
"^(.*/)?ruff$",
144-
"^(.*/)?twine$",
145-
"^(.*/)?types-"
146-
],
147-
},
148-
{
149-
// Pyright makes regular breaking changes in patch releases, so we separate these
150-
// and do them independently.
151-
matchPackageNames: ["pyright", "types/pyright"],
152-
prPriority: -4,
153-
matchBaseBranches: ["$default"], // Not for hotfix branches
154-
}
155-
],
156-
customManagers: [
157-
{
158-
// tox.ini can get updates too if we specify for each package.
159-
fileMatch: ["tox.ini"],
160-
customType: "regex",
161-
depTypeTemplate: "devDependencies",
162-
matchStrings: [
163-
"# renovate: datasource=(?<datasource>\\S+)\n\\s+(?<depName>.*?)(\\[[\\w]*\\])*[=><]=?(?<currentValue>.*?)\n"
164-
]
165-
},
166-
{
167-
// .pre-commit-config.yaml version updates
168-
fileMatch: [".pre-commit-config.yaml"],
169-
customType: "regex",
170-
datasourceTemplate: "pypi",
171-
depTypeTemplate: "lint",
172-
matchStrings: [
173-
"- repo: .*/<(?<depName>\\S+)\\s*\\n\\s*rev:\s+\"?v?(?<currentValue>\\S*)\"?",
174-
]
175-
}
176-
],
177-
timezone: "Etc/UTC",
178-
schedule: ["every weekend"],
179-
prConcurrentLimit: 2, // No more than 2 open PRs at a time.
180-
branchConcurrentLimit: 20, // No more than 20 open branches at a time.
181-
prCreation: "not-pending", // Wait until status checks have completed before raising the PR
182-
prNotPendingHours: 4, // ...unless the status checks have been running for 4+ hours.
183-
prHourlyLimit: 1, // No more than 1 PR per hour.
184-
minimumReleaseAge: "2 days",
185-
automergeStrategy: "squash", // Squash & rebase when auto-merging.
186-
semanticCommitType: "build" // use `build` as commit header type (i.e. `build(deps): <description>`)
2+
extends: ["github>canonical/starflow:renovate.json5"],
1873
}

0 commit comments

Comments
 (0)