How katorlys/github-mirror-gitea works
Main Components
a) External Services Layer:
• GitHub API (with authentication)
• Gitea API (with authentication)
b) Core Application Components:
• Configuration Manager (handling credentials.toml and options.toml)
• Cache System (represented by cache.py)
• Repository Handlers:
• GitHub Repository Manager (githubRepo.py)
• Gitea Repository Manager (giteaRepo.py)
• Gitea Organization Manager (giteaOrg.py)
• Mirror Controller (mirror.py)
• Repository Rules Engine (repoRules.py)
Component Relationships and Data Flow
[Configuration Manager] → [Mirror Controller]
• ↓
[GitHub API] ←→ [GitHub Repo Manager] → [Mirror Controller] ← [Repository Rules Engine]
• ↓
[Gitea API] ←→ [Gitea Repo Manager] ← [Mirror Controller] → [Gitea Org Manager]
• ↓
• [Cache System]
Important Details
a) Configuration Flows:
• How credentials.toml and options.toml feed into the system
• Environment variable support for Docker deployment
b) Process Flows:
• Repository discovery flow from GitHub
• Rule application process
• Mirror creation/update flow to Gitea
• Organization creation when needed
Deployment Options
A small section showing the three deployment methods:
• Direct Python execution
• Docker container
• GitHub Actions
This system design should help developers understand both the overall architecture and the specific components that enable the mirroring functionality.