generated from ztimson/template
review-labels #14
@@ -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
|
||||
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`, {
|
||||
|
||||
Reference in New Issue
Block a user
Potential null/undefined error: If
info.titleorinfo.bodyis 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'}.