fix: handle user-owned repos in get_labels (skip org labels) #62

Merged
lmiranda merged 1 commits from fix/user-owned-repo-labels into development 2026-01-21 19:47:10 +00:00
Owner

Summary

The get_labels tool was failing with 404 for user-owned repositories because it always queried /api/v1/orgs/{owner}/labels, which only works for organizations.

Changes

  • labels.py: Check is_org_repo() before fetching org labels
  • gitea_client.py: Same fix in _resolve_label_ids()
  • test_labels.py: Added tests for both org and user-owned repos

Fixes #61

Test Results

15/15 tests passing

## Summary The get_labels tool was failing with 404 for user-owned repositories because it always queried `/api/v1/orgs/{owner}/labels`, which only works for organizations. ## Changes - `labels.py`: Check `is_org_repo()` before fetching org labels - `gitea_client.py`: Same fix in `_resolve_label_ids()` - `test_labels.py`: Added tests for both org and user-owned repos Fixes #61 ## Test Results 15/15 tests passing
lmiranda added 1 commit 2026-01-21 19:41:26 +00:00
The get_labels tool was failing with 404 for user-owned repositories
because it always queried /api/v1/orgs/{owner}/labels, which only
works for organizations.

Changes:
- labels.py: Check is_org_repo() before fetching org labels
- gitea_client.py: Same fix in _resolve_label_ids()
- test_labels.py: Added tests for both org and user-owned repos

Fixes #61

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit feb86b059f into development 2026-01-21 19:47:10 +00:00
lmiranda deleted branch fix/user-owned-repo-labels 2026-01-21 19:47:10 +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#62