mirror of
https://github.com/pacnpal/Pac-cogs.git
synced 2025-12-20 10:51:05 -05:00
Update claude-review.yml
This commit is contained in:
7
.github/workflows/claude-review.yml
vendored
7
.github/workflows/claude-review.yml
vendored
@@ -134,7 +134,7 @@ jobs:
|
||||
$DIFF_CONTENT
|
||||
\`\`\`" \
|
||||
'{
|
||||
"model": "claude-3-sonnet-20241022",
|
||||
"model": "claude-3-sonnet-20240229",
|
||||
"max_tokens": 4096,
|
||||
"temperature": 0.7,
|
||||
"messages": [{
|
||||
@@ -144,12 +144,15 @@ jobs:
|
||||
}')
|
||||
|
||||
# Make the API request
|
||||
echo "Sending request to Claude API..."
|
||||
RESPONSE=$(curl -s https://api.anthropic.com/v1/messages \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "x-api-key: $ANTHROPIC_API_KEY" \
|
||||
-H "anthropic-version: 2023-06-01" \
|
||||
-d "$REQUEST_BODY")
|
||||
|
||||
echo "Response received, checking for content..."
|
||||
|
||||
if echo "$RESPONSE" | jq -e '.content[0].text' > /dev/null; then
|
||||
REVIEW=$(echo "$RESPONSE" | jq -r '.content[0].text')
|
||||
|
||||
@@ -165,7 +168,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Post review comment
|
||||
if: steps.changed-files.outputs.diff_size != '0'
|
||||
if: success() && steps.changed-files.outputs.diff_size != '0'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user