This is the primary API endpoint that runs the complete AutoRebase process.
- URL:
POST /github/autorebase - Function:
run_autorebase() - Purpose: Complete AutoRebase workflow with AI conflict resolution
{
"base_software_0": "base/v1.0.0", // SHA or tag/branch
"base_software_1": "base/v1.0.1", // SHA or tag/branch
"feature_software_0": "feature/v5.0.0", // SHA or tag/branch
"base_repo_url": "https://github.com/refactorproject/sample-base-sw.git",
"feature_repo_url": "https://github.com/refactorproject/sample-feature-sw.git",
"base_branch": "feature/v5.0.0", // Target branch for PR (optional)
"output_branch": "feature/v5.0.1" // New branch to create (optional)
}- β Validates GitHub SHAs/tags for all three repositories
- β Clones all three repositories to local workspace
- β
Runs the complete AutoRebase process:
- Generates patches between base0 β feature0
- Applies patches to base1 to create feature-5.1
- Uses AI to resolve any conflicts
- Preserves requirements from REQUIREMENTS_MAP.yml
- β
Creates a new branch (
feature/v5.0.1) in the feature repository - β Commits all resolved changes to the new branch
- β Generates a Pull Request URL for review
{
"success": true,
"message": "AutoRebase completed successfully",
"clone_results": { ... },
"autorebase_results": { ... },
"pr_results": { ... }
}curl -X POST "http://localhost:8000/github/autorebase" \
-H "Content-Type: application/json" \
-d '{
"base_software_0": "base/v1.0.0",
"base_software_1": "base/v1.0.1",
"feature_software_0": "feature/v5.0.0",
"base_repo_url": "https://github.com/refactorproject/sample-base-sw.git",
"feature_repo_url": "https://github.com/refactorproject/sample-feature-sw.git",
"base_branch": "feature/v5.0.0",
"output_branch": "feature/v5.0.1"
}'- Health check endpoint
- Returns:
{"status": "healthy", "service": "GitHub AutoRebase Processor"}
- Root endpoint with API information
- Returns: API version, available endpoints, and description
- Single API Call: One endpoint handles the entire workflow
- AI-Powered: Automatic conflict resolution using OpenAI
- Flexible Input: Supports both SHAs and human-readable tags/branches
- Complete Integration: From GitHub repos to Pull Request creation
- Robust Error Handling: Comprehensive fallback mechanisms
- Requirements Preservation: Respects REQUIREMENTS_MAP.yml constraints
This single API call replaces the entire manual AutoRebase process! π