fix(審查流程): 修正 bot 跳過、JSON 驗證與排除比對邊界
This commit is contained in:
+2
-2
@@ -146,10 +146,10 @@ export async function getBranchHeadCommitMessage(branch = PR_HEAD_BRANCH) {
|
||||
*/
|
||||
export async function shouldSkipBotCommit({ sha = PR_HEAD_SHA || process.env.GITHUB_SHA, branch = PR_HEAD_BRANCH } = {}) {
|
||||
const shaMessage = await getCommitMessageBySha(sha);
|
||||
if (sha && shaMessage.includes('[ai-review-bot]')) return true;
|
||||
if (sha && shaMessage.includes('[ai-review-bot]') && getBotReviewOutcome(shaMessage) !== 'failure') return true;
|
||||
|
||||
const branchMessage = await getBranchHeadCommitMessage(branch);
|
||||
if (branch && branchMessage.includes('[ai-review-bot]')) return true;
|
||||
if (branch && branchMessage.includes('[ai-review-bot]') && getBotReviewOutcome(branchMessage) !== 'failure') return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user