Files
siriusscan--sirius/scripts/git-hooks/pre-commit
T
wehub-resource-sync 161ef94b4f
Check engine pin consistency / Dockerfile / CI pin consistency (push) Successful in 8s
Sirius CI/CD Pipeline / Detect Changes (push) Successful in 23s
Validate Docker Configuration / Validate Docker Compose Configuration (push) Successful in 47s
Sirius CI/CD Pipeline / Build API (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Build UI (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Engine Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Merge API Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Merge UI Manifest (push) Has been cancelled
Sirius CI/CD Pipeline / Build Engine (${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Build Infra (${{ matrix.service }}, ${{ matrix.platform }}) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-postgres) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-rabbitmq) (push) Has been cancelled
Sirius CI/CD Pipeline / Merge Infra Manifest (sirius-valkey) (push) Has been cancelled
Sirius CI/CD Pipeline / Integration Test (push) Has been cancelled
Sirius CI/CD Pipeline / Public Stack Contract (push) Has been cancelled
Sirius CI/CD Pipeline / Dispatch Demo Deployment (sirius-demo branch) (push) Has been cancelled
Sirius CI/CD Pipeline / Dispatch Demo Canary (main branch) (push) Has been cancelled
Sirius CI/CD Pipeline / Guard Registry Namespace (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:32:25 +08:00

57 lines
1.9 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Pre-commit hook to automatically comment out volume mounts in docker-compose.override.yaml
# This prevents accidental commits of local development configuration
echo "🔍 Checking docker-compose.override.yaml for uncommented volume mounts..."
OVERRIDE_FILE="docker-compose.override.yaml"
if [ ! -f "$OVERRIDE_FILE" ]; then
exit 0
fi
# Check if there are any uncommented volume mounts
if grep -E "^\s*-\s+\.\./minor-projects/" "$OVERRIDE_FILE" > /dev/null; then
echo "⚠️ Found uncommented volume mounts in $OVERRIDE_FILE"
echo "🔧 Automatically commenting them out..."
# Create backup
cp "$OVERRIDE_FILE" "${OVERRIDE_FILE}.backup"
# Comment out the volume mounts
sed -i.tmp 's/^\(\s*\)-\s\+\.\./\1# - \.\./' "$OVERRIDE_FILE"
rm "${OVERRIDE_FILE}.tmp" 2>/dev/null || true
# Re-stage the fixed file
git add "$OVERRIDE_FILE"
echo "✅ Volume mounts have been commented out automatically"
echo "💡 Your local copy has been backed up to ${OVERRIDE_FILE}.backup"
echo "💡 Use docker-compose.local.yaml for local development overrides"
echo ""
fi
# Check for modified agent identity files
echo ""
echo "🤖 Checking modified agent identity files..."
AGENTS_DIR=".cursor/agents"
MODIFIED_AGENTS=$(git diff --cached --name-only --diff-filter=ACM | grep "^${AGENTS_DIR}/.*\.agent\.md$" || true)
if [ -n "$MODIFIED_AGENTS" ]; then
echo "📝 Found modified agent files, running quick validation..."
if ! bash scripts/agent-identities/lint-agents-quick.sh > /dev/null 2>&1; then
echo "❌ Agent identity validation failed!"
echo "💡 Run 'cd testing/container-testing && make lint-agents' for detailed errors"
exit 1
fi
echo "✅ Agent identity validation passed"
else
echo "️ No agent identity files modified"
fi
echo ""
echo "✅ Pre-commit validation passed"