fix: remove auto-commit from git-audit.sh — audit only, no silent mutations (C-007)
This commit is contained in:
parent
3331eb2e65
commit
6d698c1db7
|
|
@ -55,19 +55,8 @@ audit_repo() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Auto-commit repos I own (skip inou — Johan's code)
|
# NOTE: auto-commit and auto-push removed (C-007) — audit only, no mutations
|
||||||
if [ "$DIRTY_COUNT" -gt 0 ] && [ "$repo" != "inou" ]; then
|
# Commits must have meaningful messages written by the agent doing the work
|
||||||
git -C "$dir" add -A 2>/dev/null
|
|
||||||
git -C "$dir" commit -m "chore: auto-commit uncommitted changes" --quiet 2>/dev/null && {
|
|
||||||
AHEAD=$(git -C "$dir" rev-list --count "origin/$BRANCH..HEAD" 2>/dev/null || echo 0)
|
|
||||||
}
|
|
||||||
DIRTY_COUNT=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Auto-push if ahead
|
|
||||||
if [ "$AHEAD" -gt 0 ] && [ "$repo" != "inou" ]; then
|
|
||||||
timeout 5 git -C "$dir" push origin "$BRANCH" --quiet 2>/dev/null && AHEAD=0 || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ "$DIRTY_COUNT" -gt 0 ] && ANOMALIES+="⚠️ $repo: $DIRTY_COUNT uncommitted file(s)\n"
|
[ "$DIRTY_COUNT" -gt 0 ] && ANOMALIES+="⚠️ $repo: $DIRTY_COUNT uncommitted file(s)\n"
|
||||||
[ "$AHEAD" -gt 0 ] && ANOMALIES+="🔺 $repo: $AHEAD unpushed commit(s) on $BRANCH\n"
|
[ "$AHEAD" -gt 0 ] && ANOMALIES+="🔺 $repo: $AHEAD unpushed commit(s) on $BRANCH\n"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue