agent/codex/verify/scripts/pre-push-check.sh
Snider ecd47fe3db revert fcb9c189e5
revert fix(agentic): harden TODO workspace write

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-18 11:22:27 +00:00

21 lines
553 B
Bash
Executable file

#!/bin/bash
# Remind about verification before push
read -r input
# Check if tests were run recently (within last 5 minutes)
LAST_TEST=$(find . -name "*.test" -mmin -5 2>/dev/null | head -1)
LAST_COVERAGE=$(find . -name "coverage.*" -mmin -5 2>/dev/null | head -1)
if [ -z "$LAST_TEST" ] && [ -z "$LAST_COVERAGE" ]; then
cat << 'EOF'
{
"hookSpecificOutput": {
"hookEventName": "PreToolUse",
"additionalContext": "⚠️ No recent test run detected. Consider running `/verify:verify` before pushing."
}
}
EOF
else
echo "$input"
fi