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

13
dist/index.js vendored
View file

@ -110,15 +110,16 @@ function createPrompt(file, chunk, prDetails) {
const rules = core.getInput("rules"); const rules = core.getInput("rules");
const rulesPrompt = rules === "" const rulesPrompt = rules === ""
? "" ? ""
: `Your review will only ensure the following rules are followed: : `Your review will *only* ensure the following rules are followed:
${rules.replace(/\n/g, "\n- ")}`; ${rules}`;
const prompt = `Your name is ${botName}. Your task is to review pull requests. ${rulesPrompt} 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: 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>"}]} - Provide the response in following JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]}
- Do not give positive comments or compliments. - 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. - 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. - 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. - Use the given description only for the overall context and only comment the code.
- IMPORTANT: NEVER suggest adding comments to the code. - IMPORTANT: NEVER suggest adding comments to the code.
@ -129,9 +130,7 @@ Pull request description:
--- ---
${prDetails.description} ${prDetails.description}
---`; ---
console.log(prompt);
return `${prompt}
Git diff to review: Git diff to review:

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long