Merge pull request #6 from freeedcom/try-to-make-not-suggesting-commenting-more-clear

try to make prompt for not suggesting commenting more clear
This commit is contained in:
Ville Saukkonen 2023-03-30 15:55:56 +03:00 committed by GitHub
commit cc0ff7a63b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

2
dist/index.js vendored

@ -106,7 +106,7 @@ function analyzeCode(parsedDiff, prDetails) {
function createPrompt(file, chunk, prDetails) { function createPrompt(file, chunk, prDetails) {
return `- Provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}] return `- Provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]
- Do not give positive comments or compliments. - Do not give positive comments or compliments.
- Refrain from suggesting to comment on the code. - Do not recommend adding comments to the code.
- Provide comments and suggestions ONLY if there is something to improve, otherwise return an empty array. - Provide comments and suggestions ONLY if there is something to improve, otherwise return an empty array.
- Write the comment in GitHub markdown. - Write the comment in GitHub markdown.
- 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.

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

@ -81,7 +81,7 @@ async function analyzeCode(
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string { function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
return `- Provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}] return `- Provide the response in following JSON format: [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]
- Do not give positive comments or compliments. - Do not give positive comments or compliments.
- Refrain from suggesting to comment on the code. - Do not recommend adding comments to the code.
- Provide comments and suggestions ONLY if there is something to improve, otherwise return an empty array. - Provide comments and suggestions ONLY if there is something to improve, otherwise return an empty array.
- Write the comment in GitHub markdown. - Write the comment in GitHub markdown.
- 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.