Created
February 26, 2025 07:29
-
-
Save alwin-augustin-dev/a6448f53a7577e8e1614bee361aacec0 to your computer and use it in GitHub Desktop.
Code Review Prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prompt = f""" | |
# Code Review Request | |
PR Number: {context.pr_number} | |
## Changes | |
```diff | |
{context.diff} | |
Files Changed | |
{json.dumps(context.files_changed, indent=2)} | |
Recent Commits | |
{json.dumps(context.commit_messages, indent=2)} | |
Full File Context | |
{json.dumps(context.file_contents, indent=2)} | |
Please provide a detailed code review focusing on: | |
Code Quality & Style | |
Security Implications | |
Performance Considerations | |
Documentation | |
Best Practices """ | |
try: | |
response = ollama.chat( | |
model="phi4", | |
messages=[ | |
{ | |
"role": "system", | |
"content": "You are an experienced code reviewer. Provide specific, actionable feedback with code examples where relevant.", | |
}, | |
{"role": "user", "content": prompt}, | |
], | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment