All checks were successful
Build Docker Image / build (pull_request) Successful in 1m20s
Adds /resend_scout slash command to manually re-post a scout opportunity with a custom timeout window. Updates the scout_opportunity's expires_at in the database before posting. Also adds ruff pre-commit hook for staged Python files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
734 B
Bash
Executable File
32 lines
734 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Install git hooks for this repository
|
|
#
|
|
|
|
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
|
|
|
|
if [ -z "$REPO_ROOT" ]; then
|
|
echo "Error: Not in a git repository"
|
|
exit 1
|
|
fi
|
|
|
|
HOOKS_DIR="$REPO_ROOT/.githooks"
|
|
GIT_HOOKS_DIR="$REPO_ROOT/.git/hooks"
|
|
|
|
echo "Installing git hooks..."
|
|
|
|
if [ -f "$HOOKS_DIR/pre-commit" ]; then
|
|
cp "$HOOKS_DIR/pre-commit" "$GIT_HOOKS_DIR/pre-commit"
|
|
chmod +x "$GIT_HOOKS_DIR/pre-commit"
|
|
echo "Installed pre-commit hook"
|
|
else
|
|
echo "pre-commit hook not found in $HOOKS_DIR"
|
|
fi
|
|
|
|
echo ""
|
|
echo "The pre-commit hook will:"
|
|
echo " - Run ruff lint checks"
|
|
echo " - Block commits on syntax errors or lint failures"
|
|
echo ""
|
|
echo "To bypass in emergency: git commit --no-verify"
|