Skip to content

Commit 8e7044a

Browse files
committed
fix(ci): use default evot.env path, model name for --model
1 parent 0bc94ce commit 8e7044a

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

.github/scripts/auto-fix.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ if [ "$(gh pr list --repo "$REPO" --head "$BRANCH" --json number --jq 'length')"
2222
exit 0
2323
fi
2424

25+
# Build model args
26+
GEN_MODEL_ARG=""
27+
[ -n "${GENERATOR_MODEL:-}" ] && GEN_MODEL_ARG="--model $GENERATOR_MODEL"
28+
REV_MODEL_ARG=""
29+
[ -n "${REVIEWER_MODEL:-}" ] && REV_MODEL_ARG="--model $REVIEWER_MODEL"
30+
2531
git checkout -b "$BRANCH"
2632

2733
# Step 1: Generate fix
@@ -34,7 +40,7 @@ when writing documentation.
3440
3541
Issue #${NUM}: ${TITLE}
3642
${BODY}" \
37-
--model "$GENERATOR_MODEL" --env-file "$EVOT_ENV_FILE" \
43+
$GEN_MODEL_ARG \
3844
--max-turns 30 --max-duration 600 || true
3945

4046
if git diff --quiet; then
@@ -55,7 +61,7 @@ ${BODY}
5561
Respond ONLY with JSON: {\"approved\": bool, \"comments\": \"...\"}
5662
5763
${DIFF}" \
58-
--model "$REVIEWER_MODEL" --env-file "$EVOT_ENV_FILE" \
64+
$REV_MODEL_ARG \
5965
--max-turns 1 --max-duration 60 2>&1 || true)
6066

6167
if echo "$REVIEW" | grep -q '"approved"[[:space:]]*:[[:space:]]*true'; then
@@ -70,7 +76,7 @@ except: print(t[:500])" 2>/dev/null || echo "$REVIEW" | head -10)
7076

7177
evot -p "Address this review for issue #${NUM}:
7278
${COMMENTS}" \
73-
--model "$GENERATOR_MODEL" --env-file "$EVOT_ENV_FILE" \
79+
$GEN_MODEL_ARG \
7480
--max-turns 20 --max-duration 300 || true
7581
done
7682

.github/workflows/auto-fix-issues.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@ jobs:
7171
7272
- name: Write evot.env
7373
run: |
74-
cat > /tmp/evot.env << ENVEOF
75-
EVOT_LLM_PROVIDER=${{ secrets.EVOT_LLM_PROVIDER }}
74+
mkdir -p ~/.evotai
75+
cat > ~/.evotai/evot.env << ENVEOF
76+
EVOT_LLM_PROVIDER=anthropic
7677
EVOT_LLM_ANTHROPIC_BASE_URL=${{ secrets.EVOT_LLM_ANTHROPIC_BASE_URL }}
7778
EVOT_LLM_ANTHROPIC_API_KEY=${{ secrets.EVOT_LLM_ANTHROPIC_API_KEY }}
7879
EVOT_LLM_ANTHROPIC_MODEL=${{ secrets.EVOT_LLM_ANTHROPIC_MODEL }}
7980
EVOT_LLM_OPENAI_BASE_URL=${{ secrets.EVOT_LLM_OPENAI_BASE_URL }}
8081
EVOT_LLM_OPENAI_API_KEY=${{ secrets.EVOT_LLM_OPENAI_API_KEY }}
8182
EVOT_LLM_OPENAI_MODEL=${{ secrets.EVOT_LLM_OPENAI_MODEL }}
8283
ENVEOF
83-
sed -i 's/^[[:space:]]*//' /tmp/evot.env
84+
sed -i 's/^[[:space:]]*//' ~/.evotai/evot.env
8485
8586
- name: Run
8687
run: |
@@ -90,8 +91,7 @@ jobs:
9091
env:
9192
REPO: ${{ github.repository }}
9293
ISSUE_JSON: ${{ needs.check.outputs.issue }}
93-
GENERATOR_MODEL: anthropic
94-
REVIEWER_MODEL: openai
95-
EVOT_ENV_FILE: /tmp/evot.env
94+
GENERATOR_MODEL: ''
95+
REVIEWER_MODEL: gpt-5.4
9696
EVOT_ID: auto-fix-ci
9797
GH_TOKEN: ${{ secrets.GH_PAT }}

0 commit comments

Comments
 (0)