-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·40 lines (35 loc) · 1.05 KB
/
run.sh
File metadata and controls
executable file
·40 lines (35 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Quick start script for PR-Sentinel
echo "Starting PR-Sentinel..."
echo "================================"
# Check if .env exists
if [ ! -f .env ]; then
echo "⚠️ Warning: .env file not found!"
echo "Please create a .env file based on .env.example"
echo ""
echo "Minimum required configuration:"
echo " GITHUB_TOKEN=your_token_here"
echo ""
echo "Without GITHUB_TOKEN, auto-moderation will be disabled."
echo ""
fi
# Check if dependencies are installed
if ! python -c "import fastapi" 2>/dev/null; then
echo "📦 Installing dependencies..."
pip install -r requirements.txt
echo ""
fi
# Start the server
echo "🚀 Starting PR-Sentinel webhook listener..."
echo " Server will be available at: http://0.0.0.0:8000"
echo ""
echo "Endpoints:"
echo " GET / - Service information"
echo " GET /health - Health check"
echo " GET /stats - Statistics"
echo " POST /webhook - GitHub webhook"
echo ""
echo "Press Ctrl+C to stop"
echo "================================"
echo ""
python main.py