From fb5a4435d74fb0def76eae56e3c7f754bfacce65 Mon Sep 17 00:00:00 2001 From: OoO Date: Thu, 21 May 2026 12:02:26 +0800 Subject: [PATCH] =?UTF-8?q?[V10.359]=20=E4=BF=AE=E6=AD=A3=20merge=20commit?= =?UTF-8?q?=20code=20review=20trigger?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/admin_observability_routes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/admin_observability_routes.py b/routes/admin_observability_routes.py index 730b7a6..8c52ccd 100644 --- a/routes/admin_observability_routes.py +++ b/routes/admin_observability_routes.py @@ -1834,13 +1834,13 @@ def ai_calls_trigger_code_review(): ['git', 'rev-parse', 'HEAD'], stderr=subprocess.DEVNULL, ).decode().strip() changed = subprocess.check_output( - ['git', 'diff-tree', '--no-commit-id', '--name-only', '-r', commit_sha], + ['git', 'diff-tree', '--no-commit-id', '--name-only', '-r', '-m', commit_sha], stderr=subprocess.DEVNULL, ).decode().strip().split('\n') - changed = [f for f in changed if f] + changed = list(dict.fromkeys(f for f in changed if f)) if not changed: - return jsonify({'ok': False, 'error': '最新 commit 無變更檔案'}), 400 + return jsonify({'ok': False, 'error': '最新 commit 無變更檔案'}), 503 pipeline = CodeReviewPipeline( commit_sha=commit_sha,