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' ||