Skip to main content
Glama
pre-push1.35 kB
# Skip hooks in CI or when explicitly requested [ "${CI:-}" = "true" ] && exit 0 [ "${SKIP_PREPUSH:-}" = "1" ] && exit 0 # Skip validation for branch deletion pushes while read local_ref local_sha remote_ref remote_sha; do if [ "$local_sha" = "0000000000000000000000000000000000000000" ]; then echo "🗑️ Branch deletion detected - skipping pre-push validation" exit 0 fi done # Skip validation for force deletion pushes (git push origin --delete) if echo "$*" | grep -q "\-\-delete"; then echo "🗑️ Branch deletion detected - skipping pre-push validation" exit 0 fi echo "🔍 Validating branch name..." ./build/validate_workflow.py --validate-branch || { echo "❌ Branch validation failed" exit 1 } echo "🔍 Running TypeScript check..." npm run typecheck || { echo "❌ TypeScript errors found" exit 1 } echo "🔍 Running fast tests..." if [ -n "${PREPUSH_TEST_CMD:-}" ]; then sh -lc "$PREPUSH_TEST_CMD" else npm run test:offline:run --silent -- --reporter=dot --bail=1 fi || { echo "❌ Tests failed" exit 1 } # Reminder: Check if CHANGELOG was updated (warning only) if ! git diff origin/main...HEAD --name-only 2>/dev/null | grep -q "CHANGELOG.md"; then echo "⚠️ CHANGELOG.md not updated - remember to add entry before PR merge (if user-facing)" fi echo "✅ Pre-push validation complete"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kesslerio/attio-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server