From 51b69a7b81547343e97b907e746dc28f8e245ba0 Mon Sep 17 00:00:00 2001 From: Romain Pomier Date: Wed, 6 Dec 2023 16:27:33 +0100 Subject: [PATCH] Better instruction --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 5b47816..5c0c437 100644 --- a/src/main.ts +++ b/src/main.ts @@ -87,12 +87,13 @@ function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string { : `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} + Here are your instructions regarding the format and the style of the review: - Provide the response in following JSON format: {"reviews": [{"lineNumber": , "reviewComment": ""}]} - 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.