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