docs(ISSUE-WP-0006): Forgejo-only language and projection boundary
Prefer Forgejo as the self-hosted forge product. Keep Gitea only as the Gitea-compatible API identifier (module backends/gitea, type string gitea). FORGEJO_TOKEN is preferred; GITEA_* remains a deprecated alias. INTENT/SCOPE quote ACT-ADR-005: issue-core is not the fleet ops claim queue. Connector docs describe repo work record → hub index → optional Forgejo projection, not activity-core → issue-core → harness. Assistant: grok Assistant-Session: 01a09dc6-3f0d-7c93-8b11-8e83c0623d49
This commit is contained in:
parent
f9d276dadf
commit
ee9b85215d
34 changed files with 410 additions and 263 deletions
25
ROADMAP.md
25
ROADMAP.md
|
|
@ -28,7 +28,7 @@ replacing workplans/tasks.
|
|||
|
||||
✅ **Complete:**
|
||||
- Core CRUD operations (100%)
|
||||
- Gitea backend (production-ready)
|
||||
- Forgejo backend (Gitea-compatible API; production-ready)
|
||||
- Local SQLite backend (fully functional)
|
||||
- CLI with JSON output
|
||||
- Python programmatic API
|
||||
|
|
@ -80,8 +80,8 @@ def detect_git_remote() -> Optional[Dict[str, str]]:
|
|||
|
||||
Returns:
|
||||
{
|
||||
'platform': 'gitea' | 'github' | 'gitlab',
|
||||
'base_url': 'https://gitea.example.com',
|
||||
'platform': 'forgejo' | 'github' | 'gitlab',
|
||||
'base_url': 'https://forgejo.example.com',
|
||||
'owner': 'myorg',
|
||||
'repo': 'myproject'
|
||||
}
|
||||
|
|
@ -90,15 +90,15 @@ def detect_git_remote() -> Optional[Dict[str, str]]:
|
|||
def parse_remote_url(url: str) -> Optional[Dict[str, str]]:
|
||||
"""
|
||||
Parse various git remote URL formats:
|
||||
- https://gitea.example.com/owner/repo.git
|
||||
- git@gitea.example.com:owner/repo.git
|
||||
- https://forgejo.example.com/owner/repo.git
|
||||
- git@forgejo.example.com:owner/repo.git
|
||||
- https://github.com/owner/repo
|
||||
"""
|
||||
```
|
||||
|
||||
**Tests:** `tests/test_detection.py`
|
||||
- Test various URL formats (HTTPS, SSH, with/without .git)
|
||||
- Test platform detection (Gitea, GitHub, GitLab)
|
||||
- Test platform detection (Forgejo, GitHub, GitLab)
|
||||
- Test edge cases (subgroups, custom domains)
|
||||
|
||||
**Effort:** 2-3 days
|
||||
|
|
@ -112,7 +112,8 @@ def parse_remote_url(url: str) -> Optional[Dict[str, str]]:
|
|||
def load_backend_from_env() -> Optional[Dict[str, Any]]:
|
||||
"""
|
||||
Load backend config from environment variables:
|
||||
- GITEA_URL, GITEA_TOKEN, GITEA_OWNER, GITEA_REPO
|
||||
- FORGEJO_URL, FORGEJO_TOKEN, FORGEJO_OWNER, FORGEJO_REPO
|
||||
(deprecated aliases: GITEA_URL, GITEA_TOKEN / GITEA_API_TOKEN, …)
|
||||
- GITHUB_TOKEN (with auto-detection)
|
||||
- GITLAB_URL, GITLAB_TOKEN
|
||||
"""
|
||||
|
|
@ -149,10 +150,10 @@ issue config auto
|
|||
{
|
||||
"backend": {
|
||||
"type": "gitea",
|
||||
"url": "https://gitea.example.com",
|
||||
"url": "https://forgejo.example.com",
|
||||
"owner": "myorg",
|
||||
"repo": "myproject",
|
||||
"token_source": "env:GITEA_TOKEN" // or "file:/path/to/token"
|
||||
"token_source": "env:FORGEJO_TOKEN" // or "file:/path/to/token"; GITEA_* deprecated
|
||||
},
|
||||
"sync": {
|
||||
"enabled": true,
|
||||
|
|
@ -247,7 +248,7 @@ if issue backend show "$backend_name" &>/dev/null; then
|
|||
fi
|
||||
|
||||
# Offer existing values as defaults
|
||||
read -p "Gitea URL [$CURRENT_URL]: " url
|
||||
read -p "Forgejo URL [$CURRENT_URL]: " url
|
||||
url="${url:-$CURRENT_URL}"
|
||||
|
||||
read -p "Repository owner [$CURRENT_OWNER]: " owner
|
||||
|
|
@ -403,7 +404,7 @@ class LockManager:
|
|||
|
||||
**Storage:** Store claims in issue metadata or separate tracking table.
|
||||
|
||||
**For Gitea backend:**
|
||||
**For Forgejo backend:**
|
||||
```json
|
||||
// In issue.sync_metadata
|
||||
{
|
||||
|
|
@ -788,7 +789,7 @@ def sync_with_strategy(
|
|||
|
||||
### Phase 1 Success
|
||||
- [ ] Agent can attach to any repo's tracker with zero manual config
|
||||
- [ ] Environment-only setup works: `GITEA_TOKEN=xxx issue list`
|
||||
- [ ] Environment-only setup works: `FORGEJO_TOKEN=xxx issue list`
|
||||
- [ ] Auto-detection accuracy: >95% for common platforms
|
||||
|
||||
### Phase 1.5 Success (mapping)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue