From a2a13fb16ec3d655a817e548a5cb72a21c6c774e Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Tue, 13 Jan 2026 15:52:18 -0500 Subject: [PATCH] fix(ci): trigger AI review on follow-up commits to PR - Add `synchronize` event to trigger on new commits pushed to PR - Add `reopened` event to trigger when PR is reopened - Update documentation comments to reflect new behavior - Keep cancel-in-progress to prevent stale reviews Fixes issue where AI review only ran on PR creation, requiring manual /review comment for subsequent commits. --- .github/workflows/ai-review.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index 0334ab36..4431d8f3 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -3,15 +3,18 @@ # Posts as ccs-agy-reviewer[bot] via GitHub App # # Triggers: -# - Automatically when PR is first opened +# - Automatically when PR is opened, receives new commits, or is reopened # - Manually via /review comment on PR # - Manually via workflow_dispatch +# +# Note: Concurrency group cancels in-progress reviews when new commits arrive. +# This prevents wasting resources on outdated code reviews. name: AI Code Review on: pull_request_target: - types: [opened] # Only on first open, not synchronize (avoids cancel-on-push) + types: [opened, synchronize, reopened] issue_comment: types: [created] workflow_dispatch: @@ -38,7 +41,7 @@ jobs: id-token: write # Conditions: - # - PR event: only on opened (not synchronize to avoid cancel-on-push) + # - PR event: on opened, synchronize (new commits), or reopened # - Comment event: only if it's a PR, contains /review, and NOT from a bot if: > github.event_name == 'pull_request_target' ||