-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
46 lines (40 loc) · 1.19 KB
/
Copy pathsetup.sh
File metadata and controls
46 lines (40 loc) · 1.19 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
41
42
43
44
45
46
#!/bin/bash
# Setup script for PR Review Agent
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Setting up PR Review Agent..."
echo "Location: $SCRIPT_DIR"
echo ""
# Check Python version
echo "Checking Python version..."
python3 --version || { echo "Python 3 is required"; exit 1; }
# Create virtual environment
echo "Creating virtual environment..."
cd "$SCRIPT_DIR"
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
# Activate and install dependencies
echo "Installing dependencies..."
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
echo ""
echo "=========================================="
echo "Setup complete!"
echo "=========================================="
echo ""
echo "Next steps:"
echo "1. Copy .env.template to .env:"
echo " cp .env.template .env"
echo ""
echo "2. Edit .env and add your API keys:"
echo " - GITHUB_TOKEN (from https://github.com/settings/tokens)"
echo " - ANTHROPIC_API_KEY (from https://console.anthropic.com/)"
echo ""
echo "3. Test with a dry run:"
echo " ./review_pr.sh <PR_URL>"
echo ""
echo "4. To post comments, use --post flag or set POST_COMMENTS=true:"
echo " ./review_pr.sh <PR_URL> --post"
echo ""