mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 04:17:11 +00:00
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.
This commit is contained in:
@@ -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' ||
|
||||
|
||||
Reference in New Issue
Block a user