diff --git a/controllers/manageMrEvent/index.ts b/controllers/manageMrEvent/index.ts index 162a7a5..c3d8b1f 100644 --- a/controllers/manageMrEvent/index.ts +++ b/controllers/manageMrEvent/index.ts @@ -3,7 +3,6 @@ import { Logger } from "winston" import service from "../../service" import netTool from "../../service/netTool" import { Gitlab } from "../../types/gitlab" -import reviewFiles from "./reviewFiles" import summaryFiles from "./summaryFiles" import summaryMr from "./summaryMr" import Commenter from "./utils/commenter" @@ -106,12 +105,7 @@ const manageRawEvent = async ( inputs.description = changes.description || "暂无描述" // 对文件进行总结 - const { summarizedFileMap, needReviewFileMap } = await summaryFiles( - files, - true, - inputs, - logger - ) + const { summarizedFileMap } = await summaryFiles(files, true, inputs, logger) // 如果总结完的文件Map为空,则不处理 if (summarizedFileMap.size === 0) { logger.info("No summarized files") @@ -130,18 +124,18 @@ const manageRawEvent = async ( inputs.shortSummary = summarizedMr // 发送总结评论 + 文件变更 await commenter.createSummarizedComment(summarizedMr, summarizedFileMap) - // 过滤出需要审查的文件 - const needReviewFiles = files.filter( - (file) => needReviewFileMap.get(file.new_path) || false - ) - // 如果需要审查的文件为空,则不处理 - if (needReviewFiles.length === 0) { - logger.info("No need review files") - await commenter.createComment("没有需要审查的文件") - return netTool.ok() - } - // 对需要审查的文件进行审查 - await reviewFiles(needReviewFiles, inputs, commenter, logger) + // // 过滤出需要审查的文件 + // const needReviewFiles = files.filter( + // (file) => needReviewFileMap.get(file.new_path) || false + // ) + // // 如果需要审查的文件为空,则不处理 + // if (needReviewFiles.length === 0) { + // logger.info("No need review files") + // await commenter.createComment("没有需要审查的文件") + // return netTool.ok() + // } + // // 对需要审查的文件进行审查 + // await reviewFiles(needReviewFiles, inputs, commenter, logger) return netTool.ok() }