fix(ai-review): 結果推送失敗時回報工作流失敗
This commit is contained in:
@@ -579,6 +579,18 @@ function resultFilesToCommit({ createIssue, severeCount, relativePath, exclusion
|
||||
return files;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判斷本輪是否因結果 commit 未成功推送而必須失敗。
|
||||
*
|
||||
* @param {Object} params - 解構參數。
|
||||
* @param {string[]} params.filesToCommit - 本輪預期寫回遠端分支的結果檔清單。
|
||||
* @param {boolean} params.resultCommitted - 結果檔是否已成功 commit 並 push。
|
||||
* @returns {boolean} 需要寫回結果檔卻沒有成功推送時回傳 true。
|
||||
*/
|
||||
function shouldFailMissingResultCommit({ filesToCommit, resultCommitted }) {
|
||||
return filesToCommit.length > 0 && !resultCommitted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 就地排序 findings:依 嚴重→警告→建議、再依檔案路徑、再依起始行遞增。
|
||||
*
|
||||
@@ -914,6 +926,7 @@ module.exports = {
|
||||
sortFindings,
|
||||
appendExclusions,
|
||||
resultFilesToCommit,
|
||||
shouldFailMissingResultCommit,
|
||||
selectLabels,
|
||||
postSevereToIssue,
|
||||
postOthersToIssue,
|
||||
|
||||
Reference in New Issue
Block a user