fix: add repo auto-detection and improve org validation #65

Merged
lmiranda merged 1 commits from fix/repo-auto-detection-and-org-validation into development 2026-01-21 20:12:31 +00:00
Owner

Summary

Fixes three issues reported in #64:

1. Repo Auto-Detection

  • Added _detect_repo_from_git() to parse git remote URL
  • Supports SSH, SSH short, HTTPS, HTTP URL formats
  • Falls back to git remote when GITEA_REPO not set

2. Organization Validation

  • Changed is_org_repo() to use /orgs/{owner} endpoint
  • Added _is_organization() method for reliable org detection
  • Fixes issue where owner.type was null in Gitea API

3. Organization Labels

  • Fixed automatically by org validation fix

Tests

  • 6 tests for git URL parsing
  • 3 tests for org detection

All 11 new tests passing.

Fixes #64

## Summary Fixes three issues reported in #64: ### 1. Repo Auto-Detection - Added `_detect_repo_from_git()` to parse git remote URL - Supports SSH, SSH short, HTTPS, HTTP URL formats - Falls back to git remote when `GITEA_REPO` not set ### 2. Organization Validation - Changed `is_org_repo()` to use `/orgs/{owner}` endpoint - Added `_is_organization()` method for reliable org detection - Fixes issue where `owner.type` was `null` in Gitea API ### 3. Organization Labels - Fixed automatically by org validation fix ## Tests - 6 tests for git URL parsing - 3 tests for org detection **All 11 new tests passing.** Fixes #64
lmiranda added 1 commit 2026-01-21 20:11:52 +00:00
1. Repo Auto-Detection (config.py):
   - Added _detect_repo_from_git() to parse git remote URL
   - Supports SSH, SSH short, HTTPS, HTTP URL formats
   - Falls back to git remote when GITEA_REPO not set

2. Organization Validation (gitea_client.py):
   - Changed is_org_repo() to use /orgs/{owner} endpoint
   - Added _is_organization() method for reliable org detection
   - Fixes issue where owner.type was null in Gitea API

3. Tests:
   - Added 6 tests for git URL parsing
   - Added 3 tests for org detection

Fixes #64

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit d282a65fc6 into development 2026-01-21 20:12:31 +00:00
lmiranda deleted branch fix/repo-auto-detection-and-org-validation 2026-01-21 20:12:31 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#65