File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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}"}
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- "):
You can’t perform that action at this time.
0 commit comments