feat(ai-review comment): 集中更新單一審查留言

This commit is contained in:
2026-06-22 09:05:29 +00:00
parent 1b3c5a7aec
commit 8e4ea97dac
3 changed files with 35 additions and 11 deletions
+9
View File
@@ -118,6 +118,15 @@ export async function postComment(body) {
return resp.data;
}
export async function updateComment(commentId, body) {
const resp = await axios.patch(
api(`/repos/${GITEA_REPOSITORY}/issues/comments/${commentId}`),
{ body },
{ headers: headers(GITEA_COMMENT_TOKEN || GITEA_TOKEN), timeout: 30000, httpsAgent },
);
return resp.data;
}
/**
* 在 PR 指定檔案的指定行數發布行內 review comment(標註程式碼位置)。
* 透過 Gitea 的 pull reviews API,以 new_position 對應新版檔案的行號。