From 186d8f689e079aabb098da6b9280dadca1caff56 Mon Sep 17 00:00:00 2001 From: sairaj18 Date: Wed, 13 Nov 2024 15:23:08 +0530 Subject: [PATCH 1/3] added config to automerge new go patch versions --- renovate-base.json5 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/renovate-base.json5 b/renovate-base.json5 index 018d466..48fa1e7 100644 --- a/renovate-base.json5 +++ b/renovate-base.json5 @@ -62,6 +62,20 @@ // The packageRules are overrided/merged, therefore this rule needs to set automerge to false explicitly. "automerge": false, }, + { + // go.mod golang-version is not updated by default, check . + // Enable golang version bumps in 'go.mod' but disable auto-merge. + "matchDatasources": ["golang-version"], + // We always merge patch updates for golang. + "matchUpdateTypes": ["patch"], + // Exclude any dependencies which are pre-1.0.0 because those can make breaking changes at any time + // according to the SemVer spec. + "matchCurrentVersion": "!/^(0|v0)/", + // Renovate will do the following when detecting a new dependency bump: + "automerge": true, + "automergeType": "pr", + "pruneBranchAfterAutomerge": true + }, { // Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together // check for details about grouping. From 80ec84a6fc8e7f7685b567504c0571c529cfd00a Mon Sep 17 00:00:00 2001 From: sairaj18 Date: Fri, 22 Nov 2024 21:16:29 +0530 Subject: [PATCH 2/3] separated patch group from major & minor group for more readablity and also overcome redundancy --- renovate-base.json5 | 48 +++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/renovate-base.json5 b/renovate-base.json5 index 48fa1e7..f677417 100644 --- a/renovate-base.json5 +++ b/renovate-base.json5 @@ -35,6 +35,8 @@ // Exclude any dependencies which are pre-1.0.0 because those can make breaking changes at any time // according to the SemVer spec. "matchCurrentVersion": "!/^(0|v0)/", + // Exclude golang dependency so golang version in Docker, gomod files is not auto-merged. + "excludeDepNames": ["golang", "go"], // Renovate will do the following when detecting a new dependency bump: "automerge": true, "automergeType": "branch", @@ -48,8 +50,8 @@ // Exclude any dependencies which are pre-1.0.0 because those can make breaking changes at any time // according to the SemVer spec. "matchCurrentVersion": "!/^(0|v0)/", - // Exclude golang dependency so golang version in Docker files is not auto-merged. - "excludeDepNames": ["golang"], + // Exclude golang dependency so golang version in Docker, gomod files is not auto-merged. + "excludeDepNames": ["golang", "go"], "automerge": true, "automergeType": "branch", "pruneBranchAfterAutomerge": true @@ -58,29 +60,37 @@ // go.mod golang-version is not updated by default, check . // Enable golang version bumps in 'go.mod' but disable auto-merge. "matchDatasources": ["golang-version"], - "rangeStrategy": "bump", - // The packageRules are overrided/merged, therefore this rule needs to set automerge to false explicitly. + "rangeStrategy": "bump" + }, + { + // Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together + // check for details about grouping. + // Group minor and major versions with groupName golang version + "matchPackageNames": ["golang", "go"], + "matchUpdateTypes": ["minor", "major"], + "groupName": "golang version", "automerge": false, + "pruneBranchAfterAutomerge": true, + "platformAutomerge": true }, { // go.mod golang-version is not updated by default, check . - // Enable golang version bumps in 'go.mod' but disable auto-merge. - "matchDatasources": ["golang-version"], - // We always merge patch updates for golang. - "matchUpdateTypes": ["patch"], - // Exclude any dependencies which are pre-1.0.0 because those can make breaking changes at any time - // according to the SemVer spec. - "matchCurrentVersion": "!/^(0|v0)/", - // Renovate will do the following when detecting a new dependency bump: - "automerge": true, - "automergeType": "pr", - "pruneBranchAfterAutomerge": true + // Enable golang version bumps in 'go.mod'. + "matchDatasources": ["golang-patch-version"], + "rangeStrategy": "bump" }, { - // Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together - // check for details about grouping. - "matchPackageNames": ["golang", "go"], - "groupName": "golang version" + // Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together + // check for details about grouping. + // Group patchversions with groupName golang patch version + "description": "Automerge go patch version updates", + "matchPackageNames": ["golang", "go"], + "matchUpdateTypes": ["patch"], + "groupName": "golang patch version", + "automerge": true, + "pruneBranchAfterAutomerge": true, + "platformAutomerge": true } + ] } From ee86310e484df980a7d37423fbf2323a4aa5a4b6 Mon Sep 17 00:00:00 2001 From: sairaj18 Date: Mon, 25 Nov 2024 11:43:52 +0530 Subject: [PATCH 3/3] added more detailed comments in renvoate-base.json5 --- renovate-base.json5 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/renovate-base.json5 b/renovate-base.json5 index f677417..3ccf297 100644 --- a/renovate-base.json5 +++ b/renovate-base.json5 @@ -65,13 +65,13 @@ { // Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together // check for details about grouping. - // Group minor and major versions with groupName golang version + // Group golang & go packages minor, major versions with groupName "golang version" + // Disabled automerge for golang & go packages minor, major version updates "matchPackageNames": ["golang", "go"], "matchUpdateTypes": ["minor", "major"], "groupName": "golang version", "automerge": false, - "pruneBranchAfterAutomerge": true, - "platformAutomerge": true + "pruneBranchAfterAutomerge": true }, { // go.mod golang-version is not updated by default, check . @@ -82,7 +82,8 @@ { // Group the Dockerfile go bump ("golang" package) and the go.mod go bump ("go" package) together // check for details about grouping. - // Group patchversions with groupName golang patch version + // Group golang & go packages patch versions with groupName "golang patch version" + // Enabled automerge for golang & go packages patch version updates "description": "Automerge go patch version updates", "matchPackageNames": ["golang", "go"], "matchUpdateTypes": ["patch"],