Skip to content

Commit

Permalink
Update run_code_reviewer.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
champ96k committed Sep 16, 2024
1 parent 0f6f543 commit 95919ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/run_code_reviewer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Exit on any error
set -e

# Set environment variables
# Environment variables
OPENAI_API_KEY="$OPENAI_API_KEY"
GITHUB_TOKEN="$GITHUB_TOKEN"
GITHUB_REPO="$GITHUB_REPO"
Expand Down Expand Up @@ -40,7 +40,7 @@ git fetch --all
git checkout main

# Get the list of changed files in the PR
CHANGED_FILES=$(git diff --name-only origin/main)
CHANGED_FILES=$(git diff --name-only origin/main...HEAD)

echo "Changed files:"
echo "$CHANGED_FILES"
Expand All @@ -51,7 +51,7 @@ success=true
for file in $CHANGED_FILES; do
echo "Reviewing $file"

FILE_DIFF=$(git diff origin/main -- "$file")
FILE_DIFF=$(git diff origin/main...HEAD -- "$file")

RESPONSE=$(curl -X POST https://api.openai.com/v1/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
Expand Down

0 comments on commit 95919ea

Please sign in to comment.