mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-12 18:24:22 +00:00
fix(ci): prevent self-cancelling AI review workflow (#321)
fix(ci): prevent self-cancelling AI review workflow
This commit is contained in:
@@ -21,9 +21,10 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
# Cancel in-progress runs for same PR (safe now since auto-trigger is only on opened)
|
# Cancel in-progress runs for same PR + event type (prevents self-cancellation from bot comments)
|
||||||
|
# Each event type gets its own concurrency group to prevent cross-event cancellation
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ai-review-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
|
group: ai-review-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number || github.event.inputs.pr_number }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@@ -38,14 +39,16 @@ jobs:
|
|||||||
|
|
||||||
# Conditions:
|
# Conditions:
|
||||||
# - PR event: only on opened (not synchronize to avoid cancel-on-push)
|
# - PR event: only on opened (not synchronize to avoid cancel-on-push)
|
||||||
# - 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, NOT from a bot, and NOT from our review bot
|
||||||
|
# The explicit bot name check prevents self-triggering from progress comments
|
||||||
if: >
|
if: >
|
||||||
github.event_name == 'pull_request_target' ||
|
github.event_name == 'pull_request_target' ||
|
||||||
github.event_name == 'workflow_dispatch' ||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
(github.event_name == 'issue_comment' &&
|
(github.event_name == 'issue_comment' &&
|
||||||
github.event.issue.pull_request &&
|
github.event.issue.pull_request &&
|
||||||
contains(github.event.comment.body, '/review') &&
|
contains(github.event.comment.body, '/review') &&
|
||||||
github.event.comment.user.type != 'Bot')
|
github.event.comment.user.type != 'Bot' &&
|
||||||
|
github.event.comment.user.login != 'ccs-agy-reviewer[bot]')
|
||||||
|
|
||||||
# CLIProxy environment for model routing
|
# CLIProxy environment for model routing
|
||||||
env:
|
env:
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@kaitranntt/ccs",
|
"name": "@kaitranntt/ccs",
|
||||||
"version": "7.18.0-dev.5",
|
"version": "7.18.0-dev.6",
|
||||||
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
|
"description": "Claude Code Switch - Instant profile switching between Claude Sonnet 4.5 and GLM 4.6",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"cli",
|
"cli",
|
||||||
|
|||||||
Reference in New Issue
Block a user