chore: 暂时屏蔽Review功能
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 55s
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 55s
This commit is contained in:
parent
4c3acbb787
commit
f886c54947
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user