refactor: simplify gitea config to use owner/repo format

- Remove separate GITEA_OWNER config, use owner/repo format everywhere
- Add _parse_repo() helper to extract owner and repo from combined string
- Update plugin.json schema: file -> source, author as object
- Remove redundant configuration section from cmdb-assistant plugin
- Simplify gitea_client.py by removing excessive docstrings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-12 02:12:22 -05:00
parent b067802da8
commit 310bd34e82
8 changed files with 97 additions and 276 deletions

View File

@@ -15,7 +15,10 @@ from .gitea_client import GiteaClient
from .tools.issues import IssueTools
from .tools.labels import LabelTools
# Suppress noisy MCP validation warnings on stderr
logging.basicConfig(level=logging.INFO)
logging.getLogger("root").setLevel(logging.ERROR)
logging.getLogger("mcp").setLevel(logging.ERROR)
logger = logging.getLogger(__name__)
@@ -216,6 +219,10 @@ class GiteaMCPServer:
inputSchema={
"type": "object",
"properties": {
"org": {
"type": "string",
"description": "Organization name (e.g. 'bandit')"
},
"state": {
"type": "string",
"enum": ["open", "closed", "all"],
@@ -227,7 +234,8 @@ class GiteaMCPServer:
"items": {"type": "string"},
"description": "Filter by labels"
}
}
},
"required": ["org"]
}
)
]