Skip to content

Commit 1b91447

Browse files
authored
Update review.yml
1 parent e52cf67 commit 1b91447

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/review.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ jobs:
6969
7070
# Call OpenAI for inline code analysis
7171
issues_prompt = f"""
72-
Review the following code patch for errors and issues such as:
72+
You are a code reviewer. Analyze the following code patch for issues such as:
7373
- Syntax errors
7474
- Logical errors
75-
- Typos or misconfigurations
75+
- Best practices
7676
Provide specific inline comments that include:
7777
- The exact line number
7878
- A clear explanation of the issue
79-
- A suggested fix (if possible)
80-
Only analyze the code in this patch:
79+
- A suggested fix
80+
Analyze only the provided code:
8181
{patch}
8282
"""
8383
ai_headers = {"Content-Type": "application/json", "Authorization": f"Bearer {openai_key}"}
@@ -90,6 +90,9 @@ jobs:
9090
issues_response.raise_for_status()
9191
issues = issues_response.json()['choices'][0]['message']['content'].strip()
9292
93+
# Debug: Log the AI's response
94+
print(f"AI Response:\n{issues}")
95+
9396
# Parse issues for inline comments
9497
if issues and "no issues found" not in issues.lower():
9598
for issue in issues.split("\\n- "):

0 commit comments

Comments
 (0)