54 lines
1.5 KiB
Markdown
54 lines
1.5 KiB
Markdown
# Allegro-Primus Gitea Integration
|
|
|
|
Complete Gitea API integration for autonomous issue and PR management.
|
|
|
|
## Files
|
|
|
|
| File | Description |
|
|
|------|-------------|
|
|
| `gitea_client.py` | Core API client for Gitea |
|
|
| `repo_manager.py` | Git operations (clone, branch, commit, push) |
|
|
| `work_scheduler.py` | Intelligent task scheduler for autonomous work |
|
|
| `example_usage.py` | Usage examples and demos |
|
|
| `.env` | Environment configuration |
|
|
|
|
## Quick Start
|
|
|
|
```python
|
|
from gitea_client import GiteaClient
|
|
from repo_manager import RepoManager
|
|
from work_scheduler import WorkScheduler
|
|
|
|
# Initialize clients
|
|
client = GiteaClient()
|
|
manager = RepoManager()
|
|
scheduler = WorkScheduler()
|
|
|
|
# List issues
|
|
issues = client.list_issues("owner", "repo")
|
|
|
|
# Clone and work on repo
|
|
manager.ensure_repo("owner", "repo")
|
|
branch = manager.create_work_branch("owner", "repo", 42, "fix-bug")
|
|
|
|
# Run autonomous work cycle
|
|
scheduler.run_work_cycle("owner", "repo")
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
```bash
|
|
GITEA_URL=http://143.198.27.163:3000
|
|
GITEA_TOKEN=a180540578c5d48b67d5dc44f4bec2f79eb553e5
|
|
GIT_USER_NAME=Allegro-Primus
|
|
GIT_USER_EMAIL=ap@allegro-primus.local
|
|
```
|
|
|
|
## Features
|
|
|
|
- **Issue Management**: List, create, update, close issues with priority filtering
|
|
- **PR Operations**: Create, merge, comment on pull requests
|
|
- **Git Operations**: Clone, branch, commit, push with authentication
|
|
- **Autonomous Scheduling**: Query P0/P1 issues, prioritize, schedule work cycles
|
|
- **Full Integration**: Seamless flow from issue detection to PR submission
|