Skip to content

Commit ca35669

Browse files
authored
Improve renovate labeling and gomod handling
1 parent 0cc557c commit ca35669

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

config/renovate/renovate.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
],
1212

1313
"labels": [
14-
"renovate" // Standard label for all Renovate PRs
14+
"renovate", // Standard label for all Renovate PRs
15+
"{{baseBranch}}" // Add branch name as label
1516
],
1617

1718
// Branch configuration: main + release branches v0.5+
@@ -52,18 +53,25 @@
5253
"groupName": "go version",
5354
"matchPackageNames": [ "golang/go", "docker.io/library/golang", "registry.access.redhat.com/ubi9/go-toolset" ],
5455
"matchDepNames": [ "go", "golang", "docker.io/library/golang", "registry.access.redhat.com/ubi9/go-toolset" ],
55-
"matchManagers": [ "asdf", "dockerfile", "gomod" ],
56+
// gomod is not included in this packageManagers list, because the go directive in the go.mod means
57+
// "Compatible with this version or later". So it is advisable to not bump this version unless necessary.
58+
// Ref: https://docs.renovatebot.com/modules/manager/gomod/#updating-of-go-mod-and-toolchain-directives
59+
"matchManagers": [ "asdf", "dockerfile" ],
5660
"matchDatasources": [ "docker", "github-tags", "golang-version" ],
5761
"matchUpdateTypes": [ "patch" ],
5862
"commitMessageTopic": "golang version",
5963
"branchTopic": "go-version"
6064
},
6165
{
62-
// Go Version: Block actual major updates (1.x -> 2.x)
66+
// Go Version: Block actual major updates (1.x -> 2.x).
67+
// It also prevents bumps for go-toolset image versions with v9+
6368
"description": "Block Go major version updates beyond v1.x",
6469
"matchPackageNames": [ "golang/go", "docker.io/library/golang", "registry.access.redhat.com/ubi9/go-toolset" ],
6570
"matchDepNames": [ "go", "golang", "docker.io/library/golang", "registry.access.redhat.com/ubi9/go-toolset" ],
66-
"matchManagers": [ "asdf", "dockerfile", "gomod" ],
71+
// gomod is not included in this packageManagers list, because the go directive in the go.mod means
72+
// "Compatible with this version or later". So it is advisable to not bump this version unless necessary.
73+
// Ref: https://docs.renovatebot.com/modules/manager/gomod/#updating-of-go-mod-and-toolchain-directives
74+
"matchManagers": [ "asdf", "dockerfile" ],
6775
"matchDatasources": [ "docker", "github-tags", "golang-version" ],
6876
"matchUpdateTypes": [ "major" ],
6977
"enabled": false // Block all major Go version updates
@@ -74,7 +82,10 @@
7482
"groupName": "go version",
7583
"matchPackageNames": [ "golang/go", "docker.io/library/golang", "registry.access.redhat.com/ubi9/go-toolset" ],
7684
"matchDepNames": [ "go", "golang", "docker.io/library/golang", "registry.access.redhat.com/ubi9/go-toolset" ],
77-
"matchManagers": [ "asdf", "dockerfile", "gomod" ],
85+
// gomod is not included in this packageManagers list, because the go directive in the go.mod means
86+
// "Compatible with this version or later". So it is advisable to not bump this version unless necessary.
87+
// Ref: https://docs.renovatebot.com/modules/manager/gomod/#updating-of-go-mod-and-toolchain-directives
88+
"matchManagers": [ "asdf", "dockerfile" ],
7889
"matchDatasources": [ "docker", "github-tags", "golang-version" ],
7990
"matchUpdateTypes": [ "minor" ],
8091
"commitMessagePrefix": "🚨",

0 commit comments

Comments
 (0)