diff --git a/repair_agent/agent/core.py b/repair_agent/agent/core.py index 08dc00a..3a08d6a 100644 --- a/repair_agent/agent/core.py +++ b/repair_agent/agent/core.py @@ -204,11 +204,13 @@ class RepairEngine: modified_files=modified_files, diff=diff, )) - # 自动提交(仅在 Git 启用时) + # 自动提交并推送(仅在 Git 启用时) if git_enabled and auto_commit and modified_files and git_manager: bug_ids = ", ".join([f"#{b.id}" for b in bugs]) git_manager.commit(f"fix: auto repair bugs {bug_ids}") logger.info("代码已提交") + git_manager.push() + logger.info("代码已推送到远程") elif not git_enabled and auto_commit: logger.info("未配置 GitHub 仓库,跳过自动提交")