How giteabot/gitea-backporter works
Main Components
a) External Systems:
• GitHub API (for interacting with go-gitea/gitea repository)
• GitHub Webhooks (trigger point for the bot)
• Gitea Fork Repository
b) Core Service Components:
• Webhook Handler (entry point)
• Authentication & Authorization Layer
• Task Orchestrator
• Git Operations Handler
• State Management
c) Feature Modules:
• Backport Manager
• Merge Queue Manager
• Milestone Manager
• LGTM Handler
• Comment Handler
• Lock Manager
• Feedback Manager
• Command Handler
• Last Call Manager
[GitHub Webhook] → [Webhook Handler] → [Task Orchestrator] → [Feature Modules]
• ↑
• [Authentication Layer]
Key Relationships to Highlight
• Webhook Handler receiving events from GitHub
• Authentication layer validating webhook secrets
• Task Orchestrator distributing work to appropriate modules
• Git Operations Handler interacting with repositories
• State Management maintaining PR status
• Feature modules' interactions with GitHub API
Technical Details
• Deno runtime environment
• GitHub API integration points
• Webhook endpoint (/trigger)
• Environment variables configuration
• File system interactions for git operations
Implementation Notes
• How webhook.ts acts as the entry point
• How different modules (backport.ts, labels.ts, etc.) interact
• Demonstrate the flow of GitHub events through the system