File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,15 @@ jobs:
69
69
70
70
# Call OpenAI for inline code analysis
71
71
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:
73
73
- Syntax errors
74
74
- Logical errors
75
- - Typos or misconfigurations
75
+ - Best practices
76
76
Provide specific inline comments that include:
77
77
- The exact line number
78
78
- 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 :
81
81
{patch}
82
82
"""
83
83
ai_headers = {"Content-Type": "application/json", "Authorization": f"Bearer {openai_key}"}
90
90
issues_response.raise_for_status()
91
91
issues = issues_response.json()['choices'][0]['message']['content'].strip()
92
92
93
+ # Debug: Log the AI's response
94
+ print(f"AI Response:\n{issues}")
95
+
93
96
# Parse issues for inline comments
94
97
if issues and "no issues found" not in issues.lower():
95
98
for issue in issues.split("\\n- "):
You can’t perform that action at this time.
0 commit comments