[V10.359] 修正 merge commit code review trigger

This commit is contained in:
OoO
2026-05-21 12:02:26 +08:00
parent e67c926ac9
commit fb5a4435d7

View File

@@ -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,