Update dist

This commit is contained in:
Romain Pomier 2023-12-06 17:54:10 +01:00
parent 80b0b87381
commit b7863cfd35
No known key found for this signature in database
GPG key ID: 8BB93B7AA0C163E6
2 changed files with 8 additions and 9 deletions

15
dist/index.js vendored
View file

@ -110,28 +110,27 @@ function createPrompt(file, chunk, prDetails) {
const rules = core.getInput("rules");
const rulesPrompt = rules === ""
? ""
: `Your review will only ensure the following rules are followed:
${rules.replace(/\n/g, "\n- ")}`;
const prompt = `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt}
: `Your review will *only* ensure the following rules are followed:
${rules}`;
return `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt}
Here are your instructions regarding the format and the style of the review:
- Provide the response in following JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]}
- Do not give positive comments or compliments.
- Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array.
- Write the comment in GitHub Markdown format.
- You can suggest a fix in a reviewComment if you want to by using a \`\`\`suggestion\`\`\` code block.
- You can suggest a fix in a reviewComment if you want to by using a \`\`\`suggestion\`\`\` code block (with proper whitespace indentation).
- Use the given description only for the overall context and only comment the code.
- IMPORTANT: NEVER suggest adding comments to the code.
Review the following code diff in the file "${file.to}" and take the pull request title and description into account when writing the response.
Pull request title: ${prDetails.title}
Pull request description:
---
${prDetails.description}
---`;
console.log(prompt);
return `${prompt}
---
Git diff to review:

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long