diff --git a/frontend/src/pages/Deploy/GitManager/List/index.tsx b/frontend/src/pages/Deploy/GitManager/List/index.tsx index 070a7966..dd5fb0e8 100644 --- a/frontend/src/pages/Deploy/GitManager/List/index.tsx +++ b/frontend/src/pages/Deploy/GitManager/List/index.tsx @@ -104,10 +104,10 @@ const GitManager: React.FC = () => { }; // 同步项目 - const handleSyncProjects = async (groupId: number) => { + const handleSyncProjects = async () => { if (!selectedInstance) return; try { - await syncGitProjects(selectedInstance, groupId); + await syncGitProjects(selectedInstance); message.success('项目同步任务已启动'); loadInstanceInfo(); } catch (error) { @@ -116,10 +116,10 @@ const GitManager: React.FC = () => { }; // 同步分支 - const handleSyncBranches = async (projectId: number) => { + const handleSyncBranches = async () => { if (!selectedInstance) return; try { - await syncGitBranches(selectedInstance, projectId); + await syncGitBranches(selectedInstance); message.success('分支同步任务已启动'); loadInstanceInfo(); } catch (error) { @@ -127,38 +127,6 @@ const GitManager: React.FC = () => { } }; - // 批量同步项目 - const handleSyncAllProjects = async () => { - if (!selectedInstance || !instanceInfo?.repositoryGroupList) return; - try { - await Promise.all( - instanceInfo.repositoryGroupList.map(group => - syncGitProjects(selectedInstance, group.groupId) - ) - ); - message.success('所有项目同步任务已启动'); - loadInstanceInfo(); - } catch (error) { - message.error('同步失败'); - } - }; - - // 批量同步分支 - const handleSyncAllBranches = async () => { - if (!selectedInstance || !instanceInfo?.repositoryProjectList) return; - try { - await Promise.all( - instanceInfo.repositoryProjectList.map(project => - syncGitBranches(selectedInstance, project.projectId) - ) - ); - message.success('所有分支同步任务已启动'); - loadInstanceInfo(); - } catch (error) { - message.error('同步失败'); - } - }; - useEffect(() => { loadInstances(); }, []); @@ -238,7 +206,7 @@ const GitManager: React.FC = () => {