ci: Kotlin の版宣言を共有する依存を1つの更新 PR へ束ねる - #70
Merged
Merged
Conversation
catalog の `[versions] kotlin` はライブラリ 5 件とプラグイン 2 件が version.ref で共有する単一の 版宣言だが、group-by: dependency-name は依存名ごとに部分グループを作るため、同じ 1 行を書き換える だけの PR が依存の数だけ並んでいた。既定の open-pull-requests-limit (5) も 1 つの更新で埋まる。 Kotlin 系をパターンで束ねる kotlin グループを足し、残りは従来どおり依存名ごとの単一 PR とする。 group-by の部分グループは他のグループへの割り当てを見ずに親の contains? だけで対象を選ぶため、 二重の PR にならないよう gradle-builds 側は exclude-patterns で同じ対象を外す。 ディレクトリ跨ぎの重複を防ぐ gradle wrapper 等の扱いは変えていない。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Kotlin 2.4.10 → 2.4.20 の更新に対して #65〜#69 の 5 本の PR が出た。5 本とも書き換えるのは
gradle/libs.versions.tomlのkotlin = "..."という同じ 1 行で、内容は完全に重複している。原因は
group-by: dependency-name。catalog では 5 つのライブラリと 2 つのプラグインがversion.ref = "kotlin"で 1 つの版宣言を共有しているが、group-by は依存名ごとに部分グループを作るため、共有された版宣言が依存の数だけ PR へ分裂する。既定の
open-pull-requests-limitは 5 で、1 つの更新がその枠を使い切っている(プラグイン 2 件は枠に入れず出ていない)。
group-by の導入前(#2)は 1 本の "Bump kotlin from 2.4.0 to 2.4.10" で出ていた。
一方で group-by はディレクトリ跨ぎの重複(#38 / #39 の gradle wrapper 二重 PR)を解いており、
#42 / #50 のように両ディレクトリの wrapper を 1 本へ束ねている。どちらの性質も要る。
変更
Kotlin 系だけをパターンで束ねる
kotlinグループを足し、残りは従来どおりgroup-byに任せる。org.jetbrains.kotlin:*/org.jetbrains.kotlin.*(7 件)kotlingradle-buildsgradle-buildsexclude-patternsは必須で、飾りではない。dependabot-core のDependencyGroupEngineはgroup-by の部分グループを作るとき、他のグループへ割り当て済みかを見ずに親グループの
contains?だけで対象を選ぶ(create_dynamic_subgroups_for_dependency_name_groups)。gradle-buildsはpatternsを持たない = すべてに一致するため、除外しないと Kotlin の各依存がkotlinグループの PR と依存名ごとの PR の両方に出る。確認
groups2 つ・ignore・両 ecosystem)をパースして確認WildcardMatcher(*以外はRegexp.quote)と同じ規則で照合し、catalog の Kotlin 7 件が
kotlinへ入り、org.jetbrains.kotlinx:*/ dokka / ktfmt / junit-bom /maven-core / gradle-wrapper が入らないことを確認
org.apache.maven:*のignoreと github-actions 側は変更していない。残作業
設定の反映後、#65〜#69 は束ねた 1 本へ置き換わるので閉じる必要がある(このPRでは触っていない)。
🤖 Generated with Claude Code