Skip to content

Commit

Permalink
ci: update renovate config to match starbase (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau authored Mar 12, 2024
1 parent 927179e commit b9f33a5
Showing 1 changed file with 42 additions and 18 deletions.
60 changes: 42 additions & 18 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
{
// Configuration file for RenovateBot: https://docs.renovatebot.com/configuration-options
extends: ["config:base"],
ignoreDeps: [
"pygit2", //This needs to be done manually. See pyproject.toml for more details.
],
labels: ["dependencies"], // For convenient searching in GitHub
pip_requirements: {
fileMatch: ["^tox.ini$", "(^|/)requirements([\\w-]*)\\.txt$"]
fileMatch: ["^tox.ini$", "(^|/)requirements([\\w-]*)\\.txt$", "^.pre-commit-config.yaml$"]
},
packageRules: [
{
// Internal package minor patch updates get top priority, with auto-merging
groupName: "internal package patch releases",
matchPackagePatterns: ["^craft-.*"],
matchUpdateTypes: ["minor", "patch", "pin", "digest"],
prPriority: 10,
automerge: true,
minimumReleaseAge: "0 seconds",
schedule: ["at any time"],
},
{
// Same as above, but for hotfix branches, only for patch, and without auto-merging.
groupName: "internal package patch releases (hotfix)",
matchPackagePatterns: ["^craft-.*"],
matchUpdateTypes: ["patch", "pin", "digest"],
prPriority: 10,
minimumReleaseAge: "0 seconds",
schedule: ["at any time"],
matchBaseBranches: ["/^hotfix/.*/"], // All hotfix branches
},
{
// Automerge patches, pin changes and digest changes.
// Also groups these changes together.
groupName: "bugfixes",
excludePackagePrefixes: ["dev", "lint", "types"],
excludePackagePrefixes: ["lint", "types"],
matchUpdateTypes: ["patch", "pin", "digest"],
prPriority: 3, // Patches should go first!
automerge: true
Expand All @@ -26,13 +43,18 @@
prPriority: 2
},
{
// GitHub Actions are higher priority to update than most dependencies.
// GitHub Actions are higher priority to update than most dependencies since they don't tend to break things.
groupName: "GitHub Actions",
matchManagers: ["github-actions"],
prPriority: 1,
automerge: true,
},
// Everything not in one of these rules gets priority 0 and falls here.
{
//Do all pydantic-related updates together
groupName: "pydantic etc.",
matchPackagePatterns: ["^pydantic"],
},
{
// Minor changes can be grouped and automerged for dev dependencies, but are also deprioritised.
groupName: "development dependencies (non-major)",
Expand All @@ -42,7 +64,6 @@
"lint",
"types"
],
excludePackagePatterns: ["ruff"],
matchUpdateTypes: ["minor", "patch", "pin", "digest"],
prPriority: -1,
automerge: true
Expand All @@ -51,8 +72,8 @@
// Documentation related updates
groupName: "documentation dependencies",
groupSlug: "doc-dependencies",
matchPackageNames: ["Sphinx"],
matchPackagePatterns: ["^[Ss]phinx.*$", "^furo$"],
matchPackageNames: ["Sphinx", "furo"],
matchPackagePatterns: ["[Ss]phinx.*$"],
matchPackagePrefixes: ["docs"],
},
{
Expand All @@ -69,10 +90,10 @@
prPriority: -3
},
{
// Ruff is still unstable, so update it separately.
groupName: "ruff",
matchPackagePatterns: ["^(lint/)?ruff$"],
prPriority: -3
// Pyright makes regular breaking changes in patch releases, so we separate these
// and do them independently.
matchPackageNames: ["pyright", "types/pyright"],
prPriority: -4
}
],
regexManagers: [
Expand All @@ -87,18 +108,21 @@
{
// .pre-commit-config.yaml version updates
fileMatch: [".pre-commit-config.yaml"],
depTypeTemplate: "devDependencies",
datasourceTemplate: "pypi",
depTypeTemplate: "lint",
matchStrings: [
"# renovate: datasource=(?<datasource>\\S+);\\s*depName=(?<depName>.*?)\n\s+rev: \"v?(?<currentValue>.*?)\""
"- repo: .*/<(?<depName>\\S+)\\s*\\n\\s*rev:\s+\"?v?(?<currentValue>\\S*)\"?",
]
}
],
timezone: "Etc/UTC",
automergeSchedule: "every weekend",
schedule: "every weekend",
schedule: ["every weekend"],
prConcurrentLimit: 2, // No more than 2 open PRs at a time.
branchConcurrentLimit: 20, // No more than 20 open branches at a time.
prCreation: "not-pending", // Wait until status checks have completed before raising the PR
prNotPendingHours: 4, // ...unless the status checks have been running for 4+ hours.
prHourlyLimit: 1, // No more than 1 PR per hour.
stabilityDays: 2 // Wait 2 days from release before updating.
stabilityDays: 2, // Wait 2 days from release before updating.
automergeStrategy: "squash", // Squash & rebase when auto-merging.
semanticCommitType: "build" // use `build` as commit header type (i.e. `build(deps): <description>`)
}

0 comments on commit b9f33a5

Please sign in to comment.