refactor: make gitea a self-contained Cline skill

Relocate the script into the skill (skills/gitea/scripts/gitea_mcp.py) and add a
PEP 723 dependency block, so `uv run scripts/gitea_mcp.py` provisions deps with no
install step and the skill folder is portable (drop into ~/.cline/skills/). Drop
the non-standard `metadata` frontmatter — Cline only recognizes name + description.

- .mcp.json points at the relocated script and runs with --no-project (PEP 723)
- SKILL.md uses relative scripts/ paths; metadata block removed
- find_config walks up the tree to locate config.json (skill root or plugin root)
- tests import gitea_mcp via pytest pythonpath; README/CLAUDE paths updated

Tests: 119 passed, 92% coverage. Standalone list-tools verified via uv --no-project.
This commit is contained in:
2026-06-24 14:35:28 +03:00
parent 9a5750ddca
commit db5a43b19a
21 changed files with 77 additions and 58 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import list_branches, get_branch, create_branch, delete_branch, list_tags
from gitea_mcp import list_branches, get_branch, create_branch, delete_branch, list_tags
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -5,7 +5,7 @@ import json
import httpx
import respx
from server.gitea_mcp import TOOLS, dispatch, main
from gitea_mcp import TOOLS, dispatch, main
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -1,7 +1,7 @@
import pytest
import httpx
import respx
from server.gitea_mcp import list_commits, get_commit, compare_branches, list_repo_contributors
from gitea_mcp import list_commits, get_commit, compare_branches, list_repo_contributors
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -3,7 +3,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import list_directory, get_file, create_file, update_file, delete_file
from gitea_mcp import list_directory, get_file, create_file, update_file, delete_file
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import (
from gitea_mcp import (
list_issues, get_issue, create_issue, update_issue, close_issue, reopen_issue,
list_issue_comments, add_issue_comment, edit_issue_comment, delete_issue_comment,
)
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import (
from gitea_mcp import (
list_labels, create_label, add_issue_labels, list_milestones, create_milestone,
)
+1 -1
View File
@@ -1,7 +1,7 @@
import pytest
import httpx
import respx
from server.gitea_mcp import list_instances, get_server_info, get_current_user
from gitea_mcp import list_instances, get_server_info, get_current_user
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import list_notifications, mark_all_notifications_read
from gitea_mcp import list_notifications, mark_all_notifications_read
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import (
from gitea_mcp import (
list_pull_requests, get_pull_request, create_pull_request, update_pull_request,
merge_pull_request, get_pr_diff, list_pr_files, list_pr_reviews, create_pr_review,
)
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import list_releases, get_latest_release, create_release, delete_release
from gitea_mcp import list_releases, get_latest_release, create_release, delete_release
BASE = "https://gitea.test/api/v1"
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import (
from gitea_mcp import (
list_my_repos, search_repos, get_repo, create_repo, create_org_repo,
update_repo, delete_repo, fork_repo, set_repo_topics,
)
+1 -1
View File
@@ -1,7 +1,7 @@
import pytest
import httpx
import respx
from server.gitea_mcp import (
from gitea_mcp import (
get_user, search_users, list_my_orgs, get_org,
list_org_repos, list_org_members, list_org_teams,
)
+1 -1
View File
@@ -2,7 +2,7 @@ import json
import pytest
import httpx
import respx
from server.gitea_mcp import list_repo_webhooks, create_repo_webhook, delete_repo_webhook
from gitea_mcp import list_repo_webhooks, create_repo_webhook, delete_repo_webhook
BASE = "https://gitea.test/api/v1"