From bd3d52d2a150f24c627f480659094a175ac6c21c Mon Sep 17 00:00:00 2001 From: PierreGode Date: Tue, 10 Dec 2024 15:40:15 +0100 Subject: [PATCH] Update review.yml --- .github/workflows/review.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index 3a9d620..1ce19a7 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -63,6 +63,10 @@ jobs: filename = fdata['filename'] patch = fdata.get('patch', '') + # Debug: Log the patch content to ensure it's being sent correctly + print(f"Reviewing file: {filename}") + print(f"Patch:\n{patch}") + # Call OpenAI for inline code analysis issues_prompt = f""" Review the following code patch for errors and issues such as: @@ -73,7 +77,7 @@ jobs: - The exact line number - A clear explanation of the issue - A suggested fix (if possible) - Patch to analyze: + Only analyze the code in this patch: {patch} """ ai_headers = {"Content-Type": "application/json", "Authorization": f"Bearer {openai_key}"}