Skip to content

Commit 7dbb4ef

Browse files
authored
Update review.yml
1 parent 41ef028 commit 7dbb4ef

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/review.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,23 @@ jobs:
6464
patch = fdata.get('patch', '')
6565
6666
# Call OpenAI for inline code analysis
67-
issues_prompt = f"""Analyze the following code changes for syntax errors, typos, and critical issues. Provide comments for specific errors with the line number where they occur:
68-
\n\n{patch}"""
67+
issues_prompt = f"""
68+
Review the following code patch for errors and issues such as:
69+
- Syntax errors
70+
- Logical errors
71+
- Typos or misconfigurations
72+
Provide specific inline comments that include:
73+
- The exact line number
74+
- A clear explanation of the issue
75+
- A suggested fix (if possible)
76+
Patch to analyze:
77+
{patch}
78+
"""
6979
ai_headers = {"Content-Type": "application/json", "Authorization": f"Bearer {openai_key}"}
7080
data_issues = {
7181
"model": "gpt-4o-mini",
7282
"messages": [{"role": "user", "content": issues_prompt}],
73-
"temperature": 0.7
83+
"temperature": 0.5
7484
}
7585
issues_response = requests.post("https://api.openai.com/v1/chat/completions", headers=ai_headers, json=data_issues)
7686
issues_response.raise_for_status()

0 commit comments

Comments
 (0)