All checks were successful
Smoke Test / smoke (pull_request) Successful in 13s
45 lines
1.5 KiB
Bash
Executable File
45 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Run TurboQuant upstream watch monitor
|
|
# Usage: ./run_upstream_watch.sh [days]
|
|
|
|
set -e
|
|
|
|
# Default to 30 days if not specified
|
|
DAYS=${1:-30}
|
|
|
|
echo "Running TurboQuant upstream watch for last $DAYS days..."
|
|
|
|
# Check if GitHub token is set (env var or ~/.config/github/token file)
|
|
if [ -z "$GITHUB_TOKEN" ] && [ -f "$HOME/.config/github/token" ]; then
|
|
export GITHUB_TOKEN=$(cat "$HOME/.config/github/token" | tr -d '[:space:]')
|
|
echo "Loaded GitHub token from ~/.config/github/token"
|
|
fi
|
|
|
|
if [ -z "$GITHUB_TOKEN" ]; then
|
|
echo "Warning: GITHUB_TOKEN not set. Using unauthenticated API (60 req/hour limit)."
|
|
echo "Set GITHUB_TOKEN or create ~/.config/github/token for higher rate limits."
|
|
echo ""
|
|
fi
|
|
|
|
# Run the monitor
|
|
python3 scripts/upstream_watch.py --days "$DAYS" --format text --output upstream-report.md
|
|
|
|
# Also generate JSON report
|
|
python3 scripts/upstream_watch.py --days "$DAYS" --format json --output upstream-report.json
|
|
|
|
echo ""
|
|
echo "Reports generated:"
|
|
echo " - upstream-report.md (text format)"
|
|
echo " - upstream-report.json (JSON format)"
|
|
echo ""
|
|
|
|
# Check if there are findings
|
|
FINDINGS=$(python3 -c "import json; data=json.load(open('upstream-report.json')); print(data['total_found'])")
|
|
|
|
if [ "$FINDINGS" -gt 0 ]; then
|
|
echo "⚠️ Found $FINDINGS TurboQuant mentions in upstream repositories"
|
|
echo "Review upstream-report.md for details"
|
|
else
|
|
echo "✅ No TurboQuant mentions found in upstream repositories"
|
|
echo "Recommendation: Continue using fork, re-check in $DAYS days"
|
|
fi |