Skip to content

Commit

Permalink
add renovate settings
Browse files Browse the repository at this point in the history
  • Loading branch information
logica0419 committed Jan 13, 2024
1 parent b36bc3e commit e8b60e2
Show file tree
Hide file tree
Showing 8 changed files with 259 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/renovate-bot.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"username": "trap-renovate[bot]",
"gitAuthor": "trap-renovate <138502363+trap-renovate[bot]@users.noreply.github.com>",
"repositories": ["traPtitech/traQ"]
}
26 changes: 26 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"docker:enableMajor",
":disableRateLimiting",
":dependencyDashboard",
":semanticCommits",
// ":automergeDigest",
// ":automergePatch", // no auto merge
"github>traPtitech/traQ//.github/renovate/auto-merge.json5",
"github>traPtitech/traQ//.github/renovate/commit-message.json5",
"github>traPtitech/traQ//.github/renovate/gomod.json5",
"github>traPtitech/traQ//.github/renovate/labels.json5",
"github>traPtitech/traQ//.github/renovate/regex-manager.json5",
"github>traPtitech/traQ//.github/renovate/semantic-commits.json5"
],
"platform": "github",
"platformAutomerge": true,
"onboarding": false,
"dependencyDashboardTitle": "Renovate Dashboard 🤖",
"suppressNotifications": ["prIgnoreNotification"],
"branchConcurrentLimit": 0,
"prHourlyLimit": 0,
"prConcurrentLimit": 0,
}
16 changes: 16 additions & 0 deletions .github/renovate/auto-merge.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"description": "Auto merge GitHub Actions",
"matchManagers": ["github-actions"],
"automerge": true,
},
{
"description": "Auto merge up to minor",
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": "!/^0/",
"automerge": true
}
]
}
12 changes: 12 additions & 0 deletions .github/renovate/commit-message.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": "to {{newVersion}}",
"commitMessageSuffix": "",
"packageRules": [
{
"matchDatasources": ["docker"],
"commitMessageTopic": "image {{depName}}"
}
]
}
14 changes: 14 additions & 0 deletions .github/renovate/gomod.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchManagers": ["gomod"],
"matchDepTypes": ["indirect"],
"enabled": true
},
{
"matchManagers": ["gomod"],
"postUpdateOptions": ["gomodTidy", "gomodMassage"]
}
]
}
37 changes: 37 additions & 0 deletions .github/renovate/labels.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchUpdateTypes": ["major"],
"labels": ["type/major"]
},
{
"matchUpdateTypes": ["minor"],
"labels": ["type/minor"]
},
{
"matchUpdateTypes": ["patch"],
"labels": ["type/patch"]
},
{
"matchUpdateTypes": ["digest"],
"labels": ["type/digest"]
},
{
"matchDatasources": ["docker"],
"addLabels": ["renovate/container"]
},
{
"matchDatasources": ["gomod"],
"addLabels": ["renovate/gomod"]
},
{
"matchDatasources": ["github-releases", "github-tags"],
"addLabels": ["renovate/github-releases"]
},
{
"matchManagers": ["github-actions"],
"addLabels": ["renovate/github-actions"]
}
]
}
63 changes: 63 additions & 0 deletions .github/renovate/regex-manager.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customManagers": [
{
"description": "Custom dependencies",
"fileMatch": [
".+\\.ya?ml$"
],
"matchStrings": [
// Example: (github-releases) version: "v1.27.3"
"# renovate:general datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)\n.*?\"(?<currentValue>.*)\"\n",
// Example: (helm) targetRevision: "6.11.5"
"# renovate:general datasource=(?<datasource>\\S+) depName=(?<depName>\\S+) registryUrl=(?<registryUrl>\\S+)\n.*?\"(?<currentValue>.*)\"\n",
],
"datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}",
},
{
"description": "OCI image dependencies (full)",
"fileMatch": [
".+\\.ya?ml$"
],
"matchStrings": [
// Example:
// # renovate:image-full
// fooImage: "ghcr.io/motoki317/k8s-csi-s3:0.35.5-p1"
"# renovate:image-full\n.*?\"(?<registryUrl>[^\\s/]+)/(?<depName>[^\\s:]+):(?<currentValue>.+)\"\n",
],
"datasourceTemplate": "docker",
"registryUrlTemplate": "https://{{{registryUrl}}}",
"depNameTemplate": "{{{registryUrl}}}/{{{depName}}}",
},
{
"description": "OCI image dependencies (tag)",
"fileMatch": [
".+\\.ya?ml$"
],
"matchStrings": [
// Example:
// # renovate:image-tag imageName=ghcr.io/traptitech/traq
// fooTag: "0.35.5-p1"
"# renovate:image-tag imageName=(?<registryUrl>[^\\s/]+)/(?<depName>\\S+)\n.*?\"(?<currentValue>.+)\"\n",
],
"datasourceTemplate": "docker",
"registryUrlTemplate": "https://{{{registryUrl}}}",
"depNameTemplate": "{{{registryUrl}}}/{{{depName}}}"
},
{
"description": "GitHub URL dependencies",
"fileMatch": [
".+\\.ya?ml$"
],
"matchStrings": [
// Example: kustomize build https://github.com/argoproj/argo-cd//manifests/crds?ref=v2.7.6 | kubectl create -f -
"# renovate:github-url\n.*?https://github\\.com/(?<depName>[^/]+/[^/]+)//.*?\\?ref=(?<currentValue>\\S+)",
// Example: - https://raw.githubusercontent.com/traefik/traefik/v2.10.3/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
"# renovate:github-url\n.*?https://raw\\.githubusercontent\\.com/(?<depName>[^/]+/[^/]+)/(?<currentValue>[^/]+)",
// Example: - https://github.com/rancher/system-upgrade-controller/releases/download/v0.11.0/crd.yaml
"# renovate:github-url\n.*?https://github\\.com/(?<depName>[^/]+/[^/]+)/releases/download/(?<currentValue>[^/]+)"
],
"datasourceTemplate": "github-releases",
}
]
}
85 changes: 85 additions & 0 deletions .github/renovate/semantic-commits.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [
{
"matchDatasources": ["gomod"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(gomod)!: "
},
{
"matchDatasources": ["gomod"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "gomod"
},
{
"matchDatasources": ["gomod"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "gomod"
},
{
"matchDatasources": ["gomod"],
"matchUpdateTypes": ["digest"],
"semanticCommitType": "chore",
"semanticCommitScope": "gomod"
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(container)!: "
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "container"
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "container"
},
{
"matchDatasources": ["docker"],
"matchUpdateTypes": ["digest"],
"semanticCommitType": "chore",
"semanticCommitScope": "container"
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(github-release)!: "
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "github-release"
},
{
"matchDatasources": ["github-releases", "github-tags"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "github-release"
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["major"],
"commitMessagePrefix": "feat(github-action)!: "
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["minor"],
"semanticCommitType": "feat",
"semanticCommitScope": "github-action"
},
{
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["patch"],
"semanticCommitType": "fix",
"semanticCommitScope": "github-action"
}
]
}

0 comments on commit e8b60e2

Please sign in to comment.