Skip to content

fix: Renovate PRのTracking自動更新が動作しない不具合を修正 - #4

Merged
shunsuke-shimomura merged 1 commit into
mainfrom
fix/renovate-tracking-author-login
Aug 5, 2026
Merged

fix: Renovate PRのTracking自動更新が動作しない不具合を修正#4
shunsuke-shimomura merged 1 commit into
mainfrom
fix/renovate-tracking-author-login

Conversation

@shunsuke-shimomura

Copy link
Copy Markdown
Member

概要

スケジュール実行される Renovate PR の Tracking 自動更新ワークフロー (update-renovate-tracking.yml) が、対象の Renovate PR を1件も拾えず何もせずに終了していた不具合を修正します。

ジョブ自体は成功(緑)で終わるため気づきにくく、ログ上は Found 0 Renovate PR(s) in project.Nothing to do. となっていました。

失敗時の挙動例(本来 Tracking=Closed にすべき Done の Renovate PR がある状態でも 0件判定):
https://github.com/ut-issl/sw-integration-task-list/actions/runs/30964202428/job/92174496987

原因

Renovate PR の抽出フィルタが author を renovate[bot] で比較していました:

select(.content.author.login == "renovate[bot]")

しかし GraphQL API では Renovate bot の author.loginrenovateBot 型) で返ります。renovate[bot] は REST API / GitHub UI 上の表記であって GraphQL とは一致しないため、フィルタが常に false になり全件除外されていました。

実測:

{"pullRequest":{"number":109,"author":{"__typename":"Bot","login":"renovate"}}}

修正内容

GraphQL 表記 (renovate) と REST/UI 表記 (renovate[bot]) の両方にマッチさせ、content が null の項目でも落ちないようにしました:

select((.content.author.login // "") | . == "renovate" or . == "renovate[bot]")

テスト

  • 合成フィクスチャで検証: renovate / renovate[bot] 両方の PR がヒット、人間の PR・content:null の項目は除外、Done→Closed / それ以外→Tracked のロジックも期待通り。
  • python3 -c yaml.safe_load および actionlint パス。

影響範囲

  • 変更は本リポジトリの reusable workflow 1ファイルのみ。
  • 呼び出し側 (sw-integration-task-listrenovate-tracking-update.yml) は @main 参照のため、main マージ後の次回スケジュール実行(毎日 0:00 UTC)から有効になります。
  • 同ディレクトリの汎用版 update-tracking-status.yml は REST の q= フィルタ方式で author 判定を使っておらず、本不具合の影響はありません。

GraphQL APIではRenovate botのauthor.loginは"renovate"(Bot型)で返るが、
フィルタが"renovate[bot]"(REST/UI表記)と比較していたため常に不一致となり、
Status=DoneのRenovate PRがあってもTrackingがClosedに更新されず素通りしていた。
両表記にマッチさせ、content=nullの項目でも落ちないよう修正。
@github-actions github-actions Bot added ci ⚙️ Changes to CI workflows sys::SE システムズエンジニアリング sys::SW ソフトウェア labels Aug 5, 2026
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@shunsuke-shimomura
shunsuke-shimomura merged commit c9759df into main Aug 5, 2026
7 checks passed
@shunsuke-shimomura
shunsuke-shimomura deleted the fix/renovate-tracking-author-login branch August 5, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci ⚙️ Changes to CI workflows sys::SE システムズエンジニアリング sys::SW ソフトウェア

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants