Actions のバージョンコメントを実タグと一致するフルバージョンに揃える - #32
Merged
Conversation
Renovate から Dependabot へ移行した際、`# v6` のような major だけの短縮形 コメントが残っていた。Dependabot は「更新前 SHA に付いているタグ名でコメントが 終わっているか」でコメント更新の可否を判定するため、移動タグ形式の短縮形は マッチせず据え置かれ、SHA だけが更新されてコメントが実態とズレていた。 例: setup-python はコメントが `# v5` のまま実体は v7.0.0 だった。 SHA は変更せず、各 SHA に付いている最も具体的なタグ名へコメントのみを修正する。 これにより以降は Dependabot がコメントも追随して更新する。 Claude-Session: https://claude.ai/code/session_01SppdKxgYtCGigXC8dZyxob Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Signed-off-by: krrrr38 <k.kaizu38@gmail.com>
krrrr38
force-pushed
the
fix-action-version-comments
branch
from
August 30, 2026 23:14
5809272 to
994c044
Compare
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.
Summary
.github/workflows/*.ymlの SHA ピン留めに付いているバージョンコメントが、実際のタグとズレていたため修正しました。SHA は一切変更していません(コメントのみの変更なので CI の実行内容は完全に同一です)。背景
Renovate から Dependabot へ移行した際(#11)、
# v6のような major だけの短縮形コメントが残っていました。Dependabot も SHA ピン留めのコメント更新に対応していますが、version_commenter.rbの判定がとなっており、「更新前 SHA に付いているタグ名でコメントが終わっている」場合のみコメントを書き換えます。移動タグ(
v6など)は新しいパッチリリース時点で別コミットへ移るため、短縮形コメントはマッチせず据え置かれ、SHA だけが更新されていました。Renovate は元の記述 ref を追跡する設計だったため# v6が維持できていた、という違いです。直近の #30(labeler 6.0.1 → 7.0.0)でも、SHA は 7.0.0 のものに変わったのにコメントは
# v6のまま残っています。変更内容
# v6# v7.0.1# v6# v7.0.0# v6# v7.0.0# v5# v6.0.0# v5# v7.0.0# v1.72# v1.73.2# v1# v1.321.0# v1# v1.5.8# v2# v2.37.2Dependabot 移行後に更新された actions/setup-node・dorny/paths-filter・dependabot/fetch-metadata は既にフルバージョン形式で正しく追随できていたため、変更していません。
これにより以降は Dependabot がコメントも自動で追随します。
actions/checkoutのようにv7とv7.0.1の両方が同じ SHA に付いていても、Dependabot 側はsort_by { version_class.new(t.name) }の末尾を取るためフルバージョンが選ばれ、# v7へ劣化することはありません。補足
shivammathur/setup-phpの実タグは v なしの2.37.2ですが、既存スタイルに合わせて# v2.37.2としています。突き合わせはcomment.end_with?("2.37.2")なのでこれでマッチします。suzuki-shunsuke/pinact(pinact run --check)の CI 導入が有効です。actionlint / ghalint はこの不整合を検出しません。Test plan
usesについてgit ls-remote --tagsで SHA に付くタグを取得し、コメントと一致することを確認actionlintをローカル実行して指摘なし(exit 0)🤖 Generated with Claude Code