centralize guides and rails under mosaic with runtime compatibility links
This commit is contained in:
19
rails/qa/qa-hook-wrapper.sh
Executable file
19
rails/qa/qa-hook-wrapper.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Wrapper script that handles hook invocation more robustly
|
||||
|
||||
# Get the most recently modified JS/TS file as a fallback
|
||||
RECENT_FILE=$(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -mmin -1 2>/dev/null | head -1)
|
||||
|
||||
# Use provided file path or fallback to recent file
|
||||
FILE_PATH="${2:-$RECENT_FILE}"
|
||||
TOOL_NAME="${1:-Edit}"
|
||||
|
||||
# Log the attempt
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Hook wrapper called: tool=$TOOL_NAME file=$FILE_PATH" >> logs/qa-automation.log 2>/dev/null || true
|
||||
|
||||
# Call the actual QA handler if we have a file
|
||||
if [ -n "$FILE_PATH" ]; then
|
||||
~/.mosaic/rails/qa-hook-handler.sh "$TOOL_NAME" "$FILE_PATH"
|
||||
else
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] No file path available for QA check" >> logs/qa-automation.log 2>/dev/null || true
|
||||
fi
|
||||
Reference in New Issue
Block a user