Skip to content

ci: add ai-code-review caller#27

Merged
toshi0806 merged 1 commit into
mainfrom
add-ai-code-review
Jun 9, 2026
Merged

ci: add ai-code-review caller#27
toshi0806 merged 1 commit into
mainfrom
add-ai-code-review

Conversation

@toshi0806

Copy link
Copy Markdown
Member

Adds the shared ai-code-review workflow as a caller of smkwlab/.github/.github/workflows/ai-code-review.yml@v1.

PR への自動コードレビュー(ワンショット・inline)を有効化します。

  • 動作には org シークレット ANTHROPIC_API_KEY(claude モデル時)または GEMINI_API_KEY(gemini モデル時)がこのリポジトリで利用可能である必要があります(未配布なら安全にスキップ)
  • draft PR は ready_for_review まで、fork PR は secret 不在のため、いずれも安全にスキップします

Copilot AI review requested due to automatic review settings June 9, 2026 15:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このワークフローファイルは全体的にシンプルで明確な構成になっています。いくつか確認・改善すべき点を指摘します。


jobs:
review:
uses: smkwlab/.github/.github/workflows/ai-review.yml@v1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 [HIGH] [HIGH] 呼び出し先のreusable workflowのrefが @v1 と固定されています。v1 タグが強制的に更新(force push)された場合、予期しない破壊的変更が取り込まれるリスクがあります。セキュリティおよび再現性の観点から、@v1 の代わりに特定のコミットSHA(例: @abc1234)を使用することを検討してください。


on:
pull_request:
types: [opened, reopened, ready_for_review] # no synchronize: avoid re-reviewing every push

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [MEDIUM] [MEDIUM] synchronize イベントが意図的に除外されていますが、これによりPRに追加のコミットがプッシュされた際にレビューが再実行されません。コメントには「every push を避けるため」と記載されていますが、差分のみを対象とした再レビューが必要なユースケースでは問題になる可能性があります。運用方針として意図的であれば問題ありませんが、ドキュメントやREADMEに明記しておくことを推奨します。

anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
gemini_api_key: ${{ secrets.GEMINI_API_KEY }}
with:
model_code: claude-sonnet-4-6

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ [LOW] [LOW] model_code: claude-sonnet-4-6 というモデル名が直接ハードコードされています。PRの説明では「配布時にトークンが置換される」と記載されていますが、このファイルが配布後のものであれば、モデルのバージョンが変わった際に各リポジトリのファイルを個別に更新する必要が生じます。モデル名をorg/repoレベルの変数(vars.AI_REVIEW_MODEL)として外部化することで、一元管理が容易になります。

@toshi0806 toshi0806 merged commit 9b20d18 into main Jun 9, 2026
1 check passed
@toshi0806 toshi0806 deleted the add-ai-code-review branch June 9, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants