fix(ai-review): 對齊建問題模式留言順序與命名

This commit is contained in:
Jeffery
2026-07-21 14:39:42 +08:00
parent 941d763129
commit 9d05af647b
9 changed files with 64 additions and 85 deletions
+6 -6
View File
@@ -690,9 +690,9 @@ ${JSON.stringify(brief)}
* 不使用 {@link templates.othersComment} 的單一表格——表格僅用於一般模式(PR)。
*/
async function postSevereToIssue({ ctx, gitea, issueNumber, severe }) {
await Promise.all(
severe.map((finding) => gitea.createCommentOnIssue(ctx, issueNumber, templates.issueFindingComment(finding))),
);
for (const finding of severe) {
await gitea.createCommentOnIssue(ctx, issueNumber, templates.issueFindingComment(finding));
}
log('步驟9', 'INF', `已將 ${severe.length} 條嚴重問題留言到 issue #${issueNumber}。`);
}
@@ -716,9 +716,9 @@ async function postSevereToIssue({ ctx, gitea, issueNumber, severe }) {
* 以本函式把警告+建議逐條留言到追蹤 issue,確保 issue 上每條問題都是可個別回覆的留言。
*/
async function postOthersToIssue({ ctx, gitea, issueNumber, others }) {
await Promise.all(
others.map((finding) => gitea.createCommentOnIssue(ctx, issueNumber, templates.issueFindingComment(finding))),
);
for (const finding of others) {
await gitea.createCommentOnIssue(ctx, issueNumber, templates.issueFindingComment(finding));
}
log('步驟10', 'INF', `已將 ${others.length} 條警告+建議逐條留言到 issue #${issueNumber}。`);
}