From 6f65697d74772751eb515d76c356f117aaa017d9 Mon Sep 17 00:00:00 2001 From: kaitranntt Date: Thu, 8 Jan 2026 11:10:36 -0500 Subject: [PATCH] fix(ci): only auto-review on PR opened, not synchronize Removes synchronize trigger to prevent cancel-on-push issue. Reviews now trigger: - Auto: when PR is first opened - Manual: via /review comment - Manual: via workflow_dispatch This prevents pushes to dev from cancelling in-progress reviews. --- .github/workflows/ai-review.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index 50b0553f..62a088e6 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -3,14 +3,15 @@ # Posts as ccs-agy-reviewer[bot] via GitHub App # # Triggers: -# - Automatically on PR open/update +# - Automatically when PR is first opened # - Manually via /review comment on PR +# - Manually via workflow_dispatch name: AI Code Review on: pull_request_target: - types: [opened, synchronize, reopened] + types: [opened] # Only on first open, not synchronize (avoids cancel-on-push) issue_comment: types: [created] workflow_dispatch: @@ -20,7 +21,7 @@ on: required: true type: string -# Cancel in-progress runs for same PR +# Cancel in-progress runs for same PR (safe now since auto-trigger is only on opened) concurrency: group: ai-review-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }} cancel-in-progress: true @@ -36,7 +37,7 @@ jobs: id-token: write # Conditions: - # - PR event: always run (pull_request_target has secrets access for forks) + # - PR event: only on opened (not synchronize to avoid cancel-on-push) # - Comment event: only if it's a PR and contains /review if: > github.event_name == 'pull_request_target' ||