mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-08-26 09:02:23 +00:00
12 lines
457 B
Bash
12 lines
457 B
Bash
#!/usr/bin/env sh
|
|
npx lint-staged
|
|
|
|
# Run Python pre-commit checks if backend files are staged
|
|
if git diff --cached --name-only | grep -q "^backend/"; then
|
|
echo "Running backend pre-commit checks..."
|
|
staged_files=$(git diff --cached --name-only | grep '^backend/.*\.py$')
|
|
if [ -n "$staged_files" ]; then
|
|
SKIP=no-commit-to-branch uv run --project backend pre-commit run \
|
|
--config backend/.pre-commit-config.yaml --files $staged_files
|
|
fi
|
|
fi
|