review-labels #14

Merged
ztimson merged 5 commits from review-labels into master 2026-01-14 14:06:21 -05:00
Showing only changes of commit 1460c3a0ae - Show all commits

View File

@@ -95,7 +95,16 @@ dotenv.config({path: '.env.local', override: true, quiet: true, debug: false});
}]
});
const messages = await ai.language.ask(gitDiff);
const messages = await ai.language.ask(`Title: ${info.title}
ztimson marked this conversation as resolved Outdated

Potential null/undefined error: If info.title or info.body is null/undefined, this will insert "null" or "undefined" as text in the prompt. Add fallback values: Title: ${info.title || 'No title'} and ${info.body || 'No description'}.

Potential null/undefined error: If `info.title` or `info.body` is null/undefined, this will insert "null" or "undefined" as text in the prompt. Add fallback values: `Title: ${info.title || 'No title'}` and `${info.body || 'No description'}`.
Description:
\`\`\`md
${info.body}
\`\`\`
Git Diff:
\`\`\`
${gitDiff}
\`\`\``);
const summary = messages.pop().content;
if(git) {
const res = await fetch(`${git}/api/v1/repos/${owner}/${repo}/pulls/${pr}/reviews`, {