From f9e0abc4daafee50f7d8e9e94a220b9d88f5faeb Mon Sep 17 00:00:00 2001 From: panicboat Date: Tue, 3 Nov 2026 01:40:46 +0900 Subject: [PATCH 1/6] feat: automerge patch and digest updates in production Claude-Session: https://claude.ai/code/session_01N1XYRrzZCwCjwRDzNsM5UN Signed-off-by: panicboat --- default.json | 11 +++++++++++ scripts/workflows/test.sh | 14 ++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/default.json b/default.json index fa41b52..f42953e 100644 --- a/default.json +++ b/default.json @@ -73,6 +73,17 @@ "addLabels": [ "⚠️ production" ] + }, + { + "description": "✅ Production patch/digest updates - enable automerge", + "matchFileNames": [ + "**/production/**" + ], + "matchUpdateTypes": [ + "patch", + "digest" + ], + "automerge": true } ] } diff --git a/scripts/workflows/test.sh b/scripts/workflows/test.sh index 1d035bb..6f34ad1 100755 --- a/scripts/workflows/test.sh +++ b/scripts/workflows/test.sh @@ -109,10 +109,16 @@ test_resolver_skips_label_resolver_without_a_pull_request() { assert_eq "needs.resolve.outputs.has-targets == 'true' &&" "$(yq '.jobs["deploy-terragrunt"].if' "${workflow}" | head -n 1)" } -test_renovate_keeps_production_out_of_automerge() { - # Renovate applies matching packageRules in order, so a later rule overrides the production rule. - assert_eq "false" "$(jq -r '[.packageRules[] | select(.automerge != null) | select(.matchFileNames // [] | index("**/production/**"))][0].automerge' "${repo_root}/default.json")" - assert_eq "production" "$(jq -r '[.packageRules[] | select(.automerge != null)] | last | if (.matchFileNames // [] | index("**/production/**")) != null then "production" else "other" end' "${repo_root}/default.json")" +test_renovate_automerges_only_patch_and_digest_in_production() { + # Renovate applies matching packageRules in order, so the last matching rule decides automerge. + local type expected + for type in major minor patch pin digest; do + case "${type}" in + patch | digest) expected="true" ;; + *) expected="false" ;; + esac + assert_eq "${expected}" "$(jq -r --arg type "${type}" '[.packageRules[] | select(.automerge != null) | select(.matchUpdateTypes // [$type] | index($type)) | select(.matchFileNames // ["**/production/**"] | index("**/production/**")) | select(.matchPackageNames // ["*"] | index("*"))] | last | .automerge' "${repo_root}/default.json")" + done } test_label_base_deploy_fails_when_the_pull_request_lookup_fails() { From 0600d43469889c2a816d3d0b991f886f38e85efc Mon Sep 17 00:00:00 2001 From: panicboat Date: Tue, 3 Nov 2026 01:53:46 +0900 Subject: [PATCH 2/6] feat: automerge production updates except major and stop waiting for a release age Claude-Session: https://claude.ai/code/session_01N1XYRrzZCwCjwRDzNsM5UN Signed-off-by: panicboat --- README.md | 2 +- default.json | 26 ++++---------------------- scripts/workflows/test.sh | 6 +++--- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index a59aa89..76575c8 100644 --- a/README.md +++ b/README.md @@ -32,4 +32,4 @@ jobs: 他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 -`panicboat/.github` への参照は `minimumReleaseAge` を待たずに更新する。共通の workflow は panicboat 自身が release するので、公開から日を置いて様子を見る理由がないためだ。 +依存の更新は、公開から日を置かずに PR にする。 diff --git a/default.json b/default.json index f42953e..f0fd514 100644 --- a/default.json +++ b/default.json @@ -26,7 +26,7 @@ "* 21-23 * * 0-4", "* 0-8 * * 1-5" ], - "minimumReleaseAge": "1 day", + "minimumReleaseAge": null, "separateMinorPatch": false, "packageRules": [ { @@ -46,23 +46,6 @@ "📈 major-update" ] }, - { - "description": "✅ Minor/Patch updates - enable automerge", - "matchUpdateTypes": [ - "minor", - "patch", - "pin", - "digest" - ], - "automerge": true - }, - { - "description": "Shared workflows from panicboat/.github apply without waiting for a release age", - "matchPackageNames": [ - "panicboat/.github" - ], - "minimumReleaseAge": null - }, { "description": "🚫 Production environments - disable automerge", "matchFileNames": [ @@ -75,12 +58,11 @@ ] }, { - "description": "✅ Production patch/digest updates - enable automerge", - "matchFileNames": [ - "**/production/**" - ], + "description": "✅ Minor/Patch updates - enable automerge", "matchUpdateTypes": [ + "minor", "patch", + "pin", "digest" ], "automerge": true diff --git a/scripts/workflows/test.sh b/scripts/workflows/test.sh index 6f34ad1..3dca583 100755 --- a/scripts/workflows/test.sh +++ b/scripts/workflows/test.sh @@ -109,13 +109,13 @@ test_resolver_skips_label_resolver_without_a_pull_request() { assert_eq "needs.resolve.outputs.has-targets == 'true' &&" "$(yq '.jobs["deploy-terragrunt"].if' "${workflow}" | head -n 1)" } -test_renovate_automerges_only_patch_and_digest_in_production() { +test_renovate_automerges_production_except_major() { # Renovate applies matching packageRules in order, so the last matching rule decides automerge. local type expected for type in major minor patch pin digest; do case "${type}" in - patch | digest) expected="true" ;; - *) expected="false" ;; + major) expected="false" ;; + *) expected="true" ;; esac assert_eq "${expected}" "$(jq -r --arg type "${type}" '[.packageRules[] | select(.automerge != null) | select(.matchUpdateTypes // [$type] | index($type)) | select(.matchFileNames // ["**/production/**"] | index("**/production/**")) | select(.matchPackageNames // ["*"] | index("*"))] | last | .automerge' "${repo_root}/default.json")" done From 9fa4ebaa4e43cf7088de574f8ab32295910f605c Mon Sep 17 00:00:00 2001 From: panicboat Date: Tue, 3 Nov 2026 01:54:14 +0900 Subject: [PATCH 3/6] docs: remove the release age note from the Renovate preset section Claude-Session: https://claude.ai/code/session_01N1XYRrzZCwCjwRDzNsM5UN Signed-off-by: panicboat --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 76575c8..6fd6440 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,4 @@ jobs: `default.json` は、panicboat のリポジトリで共通の Renovate 設定を持つ。各リポジトリは `extends` にこの preset を書き、そのリポジトリ固有の rule だけを自分の `renovate.json` に残す。 -他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 - -依存の更新は、公開から日を置かずに PR にする。 +他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 \ No newline at end of file From 3011a8faf5b92a33c967250da5c10af15f463528 Mon Sep 17 00:00:00 2001 From: panicboat Date: Tue, 3 Nov 2026 01:54:25 +0900 Subject: [PATCH 4/6] docs: restore the trailing newline in the readme Claude-Session: https://claude.ai/code/session_01N1XYRrzZCwCjwRDzNsM5UN Signed-off-by: panicboat --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fd6440..d451281 100644 --- a/README.md +++ b/README.md @@ -30,4 +30,4 @@ jobs: `default.json` は、panicboat のリポジトリで共通の Renovate 設定を持つ。各リポジトリは `extends` にこの preset を書き、そのリポジトリ固有の rule だけを自分の `renovate.json` に残す。 -他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 \ No newline at end of file +他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 From 3a9423213a8bf1bf61e4ab3328035d0347b934d9 Mon Sep 17 00:00:00 2001 From: panicboat Date: Tue, 3 Nov 2026 01:56:41 +0900 Subject: [PATCH 5/6] revert: keep waiting a day before proposing dependency updates Claude-Session: https://claude.ai/code/session_01N1XYRrzZCwCjwRDzNsM5UN Signed-off-by: panicboat --- README.md | 2 ++ default.json | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d451281..a59aa89 100644 --- a/README.md +++ b/README.md @@ -31,3 +31,5 @@ jobs: `default.json` は、panicboat のリポジトリで共通の Renovate 設定を持つ。各リポジトリは `extends` にこの preset を書き、そのリポジトリ固有の rule だけを自分の `renovate.json` に残す。 他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 + +`panicboat/.github` への参照は `minimumReleaseAge` を待たずに更新する。共通の workflow は panicboat 自身が release するので、公開から日を置いて様子を見る理由がないためだ。 diff --git a/default.json b/default.json index f0fd514..50d1550 100644 --- a/default.json +++ b/default.json @@ -26,7 +26,7 @@ "* 21-23 * * 0-4", "* 0-8 * * 1-5" ], - "minimumReleaseAge": null, + "minimumReleaseAge": "1 day", "separateMinorPatch": false, "packageRules": [ { @@ -46,6 +46,13 @@ "📈 major-update" ] }, + { + "description": "Shared workflows from panicboat/.github apply without waiting for a release age", + "matchPackageNames": [ + "panicboat/.github" + ], + "minimumReleaseAge": null + }, { "description": "🚫 Production environments - disable automerge", "matchFileNames": [ From fdbf3c46e89a0620e9928e79e5a71ed92648a82a Mon Sep 17 00:00:00 2001 From: panicboat Date: Tue, 3 Nov 2026 01:59:06 +0900 Subject: [PATCH 6/6] feat: wait for the release age on panicboat/.github updates too Claude-Session: https://claude.ai/code/session_01N1XYRrzZCwCjwRDzNsM5UN Signed-off-by: panicboat --- README.md | 2 -- default.json | 7 ------- 2 files changed, 9 deletions(-) diff --git a/README.md b/README.md index a59aa89..d451281 100644 --- a/README.md +++ b/README.md @@ -31,5 +31,3 @@ jobs: `default.json` は、panicboat のリポジトリで共通の Renovate 設定を持つ。各リポジトリは `extends` にこの preset を書き、そのリポジトリ固有の rule だけを自分の `renovate.json` に残す。 他のリポジトリは `"extends": ["github>panicboat/.github"]` と書く。これは、別のリポジトリに置いた preset を参照する書式として Renovate の docs が示しているものだ。このリポジトリは `"extends": ["local>panicboat/.github"]` と書く。`local>` は対象のリポジトリと同じ platform にある preset を参照する書式で、github.com では `github>` と同じに解決される。 - -`panicboat/.github` への参照は `minimumReleaseAge` を待たずに更新する。共通の workflow は panicboat 自身が release するので、公開から日を置いて様子を見る理由がないためだ。 diff --git a/default.json b/default.json index 50d1550..dd91342 100644 --- a/default.json +++ b/default.json @@ -46,13 +46,6 @@ "📈 major-update" ] }, - { - "description": "Shared workflows from panicboat/.github apply without waiting for a release age", - "matchPackageNames": [ - "panicboat/.github" - ], - "minimumReleaseAge": null - }, { "description": "🚫 Production environments - disable automerge", "matchFileNames": [