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
+2 -2
View File
@@ -5,7 +5,7 @@ const test = require('node:test');
const gitea = require('../src/lib/gitea');
function withFetchStub(handler, fn) {
function withFetchStub(handler, callback) {
const originalFetch = global.fetch;
const calls = [];
global.fetch = async (url, options = {}) => {
@@ -13,7 +13,7 @@ function withFetchStub(handler, fn) {
return handler(url, options);
};
return Promise.resolve()
.then(() => fn(calls))
.then(() => callback(calls))
.finally(() => {
global.fetch = originalFetch;
});