File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ ${BODY}" \
4343 $GEN_MODEL_ARG \
4444 --max-turns 30 --max-duration 600 || true
4545
46- if git diff --quiet; then
46+ if git diff --quiet && git diff --cached --quiet && [ -z " $( git ls-files --others --exclude-standard docs/ ) " ] ; then
4747 echo " No changes"
4848 cleanup_on_failure
4949 exit 0
5252# Step 2: Review loop (max 2 rounds)
5353APPROVED=false
5454for round in 1 2; do
55- DIFF=$( git diff)
55+ # Stage docs changes for diff
56+ git add docs/
57+ DIFF=$( git diff --cached)
5658 [ -z " $DIFF " ] && { APPROVED=true; break ; }
5759
5860 REVIEW=$( evot -p " Review this diff for issue #${NUM} : ${TITLE}
@@ -81,15 +83,17 @@ ${COMMENTS}" \
8183done
8284
8385# Step 3: PR
84- git add -A
86+ git add docs/
8587git commit -m " docs: auto-fix #${NUM} " || { cleanup_on_failure; exit 0; }
8688git push origin " $BRANCH " --force
8789
90+ GEN_LABEL=" ${GENERATOR_MODEL:- default} "
91+ REV_LABEL=" ${REVIEWER_MODEL:- default} "
8892STATUS=$( [ " $APPROVED " = true ] && echo " ✅ Approved" || echo " ⚠️ Needs human review" )
8993gh pr create --repo " $REPO " --base " $MAIN " --head " $BRANCH " \
9094 --title " docs: auto-fix #${NUM} " \
9195 --body " Fixes #${NUM} . ${STATUS}
92- Generated by \` ${GENERATOR_MODEL } \` , reviewed by \` ${REVIEWER_MODEL } \` ." \
96+ Generated by \` ${GEN_LABEL } \` , reviewed by \` ${REV_LABEL } \` ." \
9397 --label auto-fix || true
9498
9599# Mark done
You can’t perform that action at this time.
0 commit comments