fix: ai-review gracefully skips when LiteLLM secrets not configured
This commit is contained in:
@@ -97,6 +97,13 @@ PROMPT
|
||||
)
|
||||
|
||||
echo "=== Sending to LiteLLM for review ==="
|
||||
|
||||
# Skip if LiteLLM is not configured (secrets not available)
|
||||
if [ -z "${LITELLM_URL:-}" ] || [ -z "${LITELLM_KEY:-}" ]; then
|
||||
echo "⚠️ LiteLLM secrets not configured — skipping AI review"
|
||||
echo " Set LITELLM_URL and LITELLM_KEY as Gitea repository secrets"
|
||||
exit 0
|
||||
fi
|
||||
RESPONSE=$(curl -sf -X POST "$LITELLM_URL/v1/chat/completions" \
|
||||
-H "Authorization: Bearer $LITELLM_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
Reference in New Issue
Block a user