Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: Completely rewrite workflow to resolve all shell syntax errors

LearningCircuitfdbcb15f1dd5
diff --git a/.github/workflows/ai-code-reviewer.yml b/.github/workflows/ai-code-reviewer.yml
index 0b7da90759..27ff8978b4 100644
--- a/.github/workflows/ai-code-reviewer.yml
+++ b/.github/workflows/ai-code-reviewer.yml
@@ -353,7 +353,9 @@ jobs:
- name: Code Quality Review via API
id: review
run: |
- PROMPT='You are a code quality expert reviewing a pull request. Analyze the code diff for quality issues and respond with JSON:
+ # Create a temporary file for the prompt
+ cat > prompt.txt << 'EOF'
+ You are a helpful code quality expert reviewing a pull request. Analyze the code diff for quality issues and respond with JSON. Be constructive and encouraging in your feedback.
Focus on:
- Code readability and maintainability
@@ -393,12 +395,18 @@ jobs:
}
Status logic:
- - "fail" = Critical quality issues that impact maintainability (use fail sparingly)
+ - "fail" = Critical quality issues that impact maintainability
- "warning" = Quality issues that should be improved
- "pass" = No significant quality issues found
Code diff to review:
- ${{ steps.diff.outputs.diff }}'
+ EOF
+
+ # Append the diff to the prompt
+ cat "${{ steps.diff.outputs.diff }}" >> prompt.txt
+
+ # Read the prompt into a variable
+ PROMPT=$(cat prompt.txt)
RESPONSE=$(curl -s -X POST "https://openrouter.ai/api/v1/chat/completions" \
-H "Content-Type: application/json" \
@@ -433,19 +441,19 @@ jobs:
let comment = '## 🎨 Code Quality Review\n\n';
if (status === 'fail') {
- comment += '❌ **FAILED** - Critical code quality issues found:\n\n';
+ comment += '🎨 **Quality Check** - Found opportunities to improve code quality:\n\n';
issues.forEach(issue => {
comment += `**${issue.type.toUpperCase()}**: ${issue.message}`;
if (issue.file) comment += ` (${issue.file}:${issue.line || '?'})`;
comment += '\n\n';
});
} else if (status === 'warning') {
- comment += '⚠️ **WARNING** - Code quality concerns found:\n\n';
+ comment += '💡 **Quality Opportunities** - Good code quality! Here are ways to make it even better:\n\n';
warnings.forEach(warning => {
comment += `• ${warning.message}\n`;
});
} else {
- comment += '✅ **PASSED** - No significant quality issues found\n\n';
+ comment += '🌟 **Excellent Code Quality** - Great coding practices!\n\n';
}
comment += '\n---\n*This review was generated by AI (GLM-4.6) and should be verified by a human reviewer.*';
@@ -460,7 +468,7 @@ jobs:
- name: Fail if Quality Issues Found
if: steps.review.outputs.status == 'fail'
run: |
- echo "❌ Code quality check failed - PR cannot proceed"
+ echo "🎨 Code quality opportunities found - please address these quality points"
exit 1
# Fourth check: Custom Requirements (only runs if all above pass)
@@ -491,7 +499,9 @@ jobs:
- name: Custom Requirements Review via API
id: review
run: |
- PROMPT='You are reviewing a pull request for custom team requirements. Analyze the code diff and respond with JSON:
+ # Create a temporary file for the prompt
+ cat > prompt.txt << 'EOF'
+ You are reviewing a pull request for custom team requirements. Analyze the code diff and respond with JSON. Be helpful and constructive in your feedback.
Focus on:
- Adherence to project coding standards
@@ -533,10 +543,16 @@ jobs:
Status logic:
- "fail" = Critical violations of team requirements
- "warning" = Minor deviations from team standards
- - "pass" - All custom requirements met
+ - "pass" = All custom requirements met
Code diff to review:
- ${{ steps.diff.outputs.diff }}'
+ EOF
+
+ # Append the diff to the prompt
+ cat "${{ steps.diff.outputs.diff }}" >> prompt.txt
+
+ # Read the prompt into a variable
+ PROMPT=$(cat prompt.txt)
RESPONSE=$(curl -s -X POST "https://openrouter.ai/api/v1/chat/completions" \
-H "Content-Type: application/json" \
@@ -571,19 +587,19 @@ jobs:
let comment = '## 🔧 Custom Requirements Review\n\n';
if (status === 'fail') {
- comment += '❌ **FAILED** - Custom requirement issues found:\n\n';
+ comment += '🔧 **Requirements Check** - Found items that need attention:\n\n';
issues.forEach(issue => {
comment += `**${issue.type.toUpperCase()}**: ${issue.message}`;
if (issue.file) comment += ` (${issue.file}:${issue.line || '?'})`;
comment += '\n\n';
});
} else if (status === 'warning') {
- comment += '⚠️ **WARNING** - Custom requirement concerns found:\n\n';
+ comment += '💡 **Requirements Opportunities** - Good adherence! Here are some improvements:\n\n';
warnings.forEach(warning => {
comment += `• ${warning.message}\n`;
});
} else {
- comment += '✅ **PASSED** - All custom requirements met\n\n';
+ comment += '🌟 **Excellent Requirements Adherence** - All custom requirements met!\n\n';
}
comment += '\n---\n*This review was generated by AI (GLM-4.6) and should be verified by a human reviewer.*';
@@ -598,7 +614,7 @@ jobs:
- name: Fail if Custom Requirements Issues Found
if: steps.review.outputs.status == 'fail'
run: |
- echo "❌ Custom requirements check failed - PR cannot proceed"
+ echo "🔧 Custom requirements need attention - please address these requirement points"
exit 1
# Summary job - runs only if all checks pass