ShipSure is an AI-powered pull request risk analysis tool that automatically analyzes GitHub pull requests, generates unit tests using CodeRabbit, runs them in Daytona sandboxes, and provides comprehensive risk assessments using GPT.
- 🔍 Repository & PR Selection: Search and select repositories, then choose PRs to analyze
- 🤖 Automated Test Generation: Requests CodeRabbit to generate unit tests for selected PRs
- 🧪 Test Execution: Runs generated tests in isolated Daytona sandboxes
- 🧠 AI Risk Analysis: Uses GPT to analyze code, tests, and reviews for comprehensive risk assessment
- 📊 Risk Categories: Provides detailed risk breakdown across Security, Performance, Maintainability, Reliability, and Compatibility
⚠️ Specific Risk Identification: Identifies and categorizes specific risks with severity levels and recommendations- 🎨 Beautiful UI: Modern, cyber-themed interface with real-time progress tracking
- Python 3.8+
- GitHub Personal Access Token (with repo access)
- Daytona API Key
- OpenAI API Key
- Clone the repository:
git clone <repository-url>
cd ShipSure- Install dependencies:
pip install -r requirements.txt- Start the server:
python server.py- Open your browser and navigate to:
http://localhost:5000
Or if you are using Live server extension for running front end:
http://localhost:5500
- In the web interface:
- Enter your GitHub Token and click Load Repos
- Search and select a repository
- Select the pull requests you want to analyze
- Enter your Daytona API Key and OpenAI API Key
- Click Analyze
- Repository Selection: Fetches all repositories accessible with your GitHub token
- PR Selection: Lists all open pull requests for the selected repository
- Test Generation: Requests CodeRabbit to generate unit tests for selected PRs
- Test Execution: Waits for CodeRabbit to create test PRs (polls every minute for up to 15 minutes)
- Daytona Testing: Runs the generated tests in isolated Daytona sandboxes
- AI Analysis: Analyzes code, test results, and CodeRabbit reviews using GPT
- Results Display: Shows comprehensive risk analysis with categories, specific risks, and recommendations
ShipSure/
├── backend/ # Backend Python modules
│ ├── github_client.py # GitHub API client
│ ├── gpt_analyzer.py # GPT risk analysis
│ ├── pr_processor.py # PR processing logic
│ ├── test_runner.py # Daytona test execution
│ └── run_tests_daytona.py # Test file preparation
├── frontend/ # Frontend web application
│ ├── index.html # Main HTML
│ ├── app.js # Frontend logic
│ └── app.css # Styling
├── server.py # Flask server
└── requirements.txt # Python dependencies
GET /api/repos?token=<github_token>- Fetch user repositoriesGET /api/repos/<owner>/<repo>/prs?token=<github_token>- Fetch PRs for a repositoryPOST /api/analyze- Start analysis (returns jobId)GET /api/analyze/<jobId>/status- Get analysis statusGET /api/analyze/<jobId>/results- Get analysis results
- The analysis process can take 10-15 minutes as it waits for CodeRabbit to generate tests
- Test generation requests are deduplicated - if a test PR already exists or a request was already made, it won't create duplicates
- Results are saved to the
output/directory - The application uses async processing - you can monitor progress in real-time
[Add your license here]


