Skip to content

Commit 2360ef6

Browse files
committed
refactor(pull_request_review): enhance review criteria and prompt for more comprehensive analysis
- Expanded the prompt in review_pull_request function to include: - Focus on detecting issues, bugs, and security vulnerabilities - Analysis of unintended consequences and side effects - Consideration of code maintainability, performance, scalability, and best practices - Suggestions for using specific libraries, tools, or frameworks - Improved formatting and clarity of the prompt structure
1 parent f0e6b8d commit 2360ef6

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

app/pull_request_review.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,28 @@ def review_pull_request(pr_number):
2727
if not pr_diff:
2828
return
2929
prompt = f"""Review the following pull request diff and provide a concise review comment.
30-
Include any potential issues, suggestions for improvement, and overall assessment.
31-
If you have any specific code change suggestions, please include them as well.
30+
Focus on detecting any potential issues, bugs, or security vulnerabilities.
31+
Include suggestions for improvement, and an overall assessment of code quality and functionality.
32+
If you have any specific code change suggestions to address these concerns, please include them as well.
33+
34+
Additionally, highlight any unintended consequences or potential side effects that the developer may not have realized.
35+
Consider suggesting better approaches based on established frameworks or design patterns.
36+
37+
Analyze the changes in the context of:
38+
1. Code maintainability and readability
39+
2. Performance implications
40+
3. Scalability considerations
41+
4. Adherence to best practices and coding standards
42+
5. Potential impact on other parts of the system
43+
44+
If applicable, recommend using specific libraries, tools, or frameworks that could improve the implementation.
3245
3346
{pr_diff}
3447
35-
Respond with only the review comment, enclosed in triple backticks (```). For example:
48+
Respond with only the review comment, enclosed in triple backticks (```).
49+
50+
For example:
51+
3652
```
3753
The changes look good overall. Consider adding more unit tests for the new functionality.
3854

0 commit comments

Comments
 (0)