[V10.359] 修正 merge commit code review trigger
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user