Added PR info as context to AI
All checks were successful
Publish Library / Build NPM Project (push) Successful in 3s
Publish Library / Tag Version (push) Successful in 5s
Code review / review (pull_request) Successful in 46s

This commit is contained in:
2026-01-14 13:44:31 -05:00
parent ebc3da8605
commit 1460c3a0ae

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}
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`, {