@@ -41643,8 +41643,16 @@ async function getPRDiff(octokit, context) {
4164341643}
4164441644
4164541645async function analyzeDiff(diff, modelId, openRouterKey, customPrompt) {
41646- const defaultPrompt = `You are a highly skilled software engineer reviewing a pull request.
41647- Analyze the following code changes and provide a detailed review in the following format:
41646+ const defaultPrompt = `You are a highly skilled staff software engineer reviewing a pull request.
41647+
41648+ Avoid generic BS advice. For each advice, please provide a file Path of the related change. No need to paste the code itself.
41649+
41650+ Do not mention what's good on the code. Just focus on what's bad and how to improve.
41651+
41652+ Analyze the following code changes and provide a detailed review in the following format. MAKE SURE TO ADHERE TO THIS FORMAT!
41653+
41654+ ### Overall score
41655+ [Give a 1-5 star rating for this PR] and final comments
4164841656
4164941657### Potential Issues
4165041658[List any bugs, vulnerabilities, or critical issues]
@@ -41661,8 +41669,6 @@ Analyze the following code changes and provide a detailed review in the followin
4166141669### Best Practices
4166241670[Suggest adherence to coding standards and best practices]
4166341671
41664- ### Overall score
41665- [Give a 1-5 star rating for this PR] and final comments
4166641672
4166741673Please be specific and provide actionable feedback.`;
4166841674
@@ -41711,7 +41717,7 @@ async function createPRComment(octokit, context, analysis) {
4171141717 owner: context.repo.owner,
4171241718 repo: context.repo.repo,
4171341719 issue_number: context.payload.pull_request.number,
41714- body: `## OpenRouter AI Analysis
41720+ body: `## DiffGuard AI Analysis
4171541721
4171641722${analysis}
4171741723
0 commit comments