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: Make AI code reviewer workflow more robust

LearningCircuiteb98c1411fb0
diff --git a/.github/workflows/ai-code-reviewer.yml b/.github/workflows/ai-code-reviewer.yml
index a74c5e58d2..0a81c5949d 100644
--- a/.github/workflows/ai-code-reviewer.yml
+++ b/.github/workflows/ai-code-reviewer.yml
@@ -26,8 +26,9 @@ jobs:
- name: Get PR diff
run: |
- git fetch origin main
- git diff origin/main...HEAD --no-color > diff.txt
+ # Fetch the base branch (works for any target branch, not just main)
+ git fetch origin ${{ github.event.pull_request.base.ref }}
+ git diff origin/${{ github.event.pull_request.base.ref }}...HEAD --no-color > diff.txt
- name: AI Code Review
env:
@@ -39,7 +40,11 @@ jobs:
MAX_DIFF_SIZE: 800000
run: |
# Run the AI reviewer and post the comment directly via stdin
- cat diff.txt | bash github/scripts/ai-reviewer.sh | gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} -F -
+ # If the script fails, the error message will be posted as a comment
+ cat diff.txt | bash github/scripts/ai-reviewer.sh | gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} -F - || {
+ echo "⚠️ AI Code Review failed. Check the workflow logs for details."
+ exit 1
+ }
- name: Cleanup
if: always()