mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-07 18:22:30 +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
|
# Posts as ccs-agy-reviewer[bot] via GitHub App
|
||||||
#
|
#
|
||||||
# Triggers:
|
# 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 /review comment on PR
|
||||||
# - Manually via workflow_dispatch
|
# - 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
|
name: AI Code Review
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [opened] # Only on first open, not synchronize (avoids cancel-on-push)
|
types: [opened, synchronize, reopened]
|
||||||
issue_comment:
|
issue_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -38,7 +41,7 @@ jobs:
|
|||||||
id-token: write
|
id-token: write
|
||||||
|
|
||||||
# Conditions:
|
# 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
|
# - Comment event: only if it's a PR, contains /review, and NOT from a bot
|
||||||
if: >
|
if: >
|
||||||
github.event_name == 'pull_request_target' ||
|
github.event_name == 'pull_request_target' ||
|
||||||
|
|||||||
Reference in New Issue
Block a user