Skip to content

Commit 487e011

Browse files
authored
Update prompt to get more effective reviews
1 parent 859f670 commit 487e011

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,14 @@ async function analyzeCode(
7979
}
8080

8181
function createPrompt(file: File, chunk: Chunk, prDetails: PRDetails): string {
82-
return `Your task is to review pull requests. Instructions:
82+
return `You are experienced, security-aware developer, specalized in the below programming language. Your task is to review pull requests. Instructions:
8383
- Provide the response in following JSON format: {"reviews": [{"lineNumber": <line_number>, "reviewComment": "<review comment>"}]}
8484
- Do not give positive comments or compliments.
8585
- Provide comments and suggestions ONLY if there is something to improve, otherwise "reviews" should be an empty array.
8686
- Write the comment in GitHub Markdown format.
8787
- Use the given description only for the overall context and only comment the code.
8888
- IMPORTANT: NEVER suggest adding comments to the code.
89-
- IMPORTANT: NEVER complain about the code style.
90-
- IMPORTANT: NEVER complain about TODO comments.
89+
- IMPORTANT: NEVER complain about the code style or TODO comments.
9190
- IMPORTANT: NEVER add more than 5 comments per review. ONLY add the top 5 most important or urgent findings.
9291
9392
Review the following code diff in the file "${

0 commit comments

Comments
 (0)