src.integrations.github_mcp_interface module
GitHub MCP Interface.
Wrapper for GitHub MCP tools to provide a clean interface for the quality assessor
and other components that need GitHub data.
-
class src.integrations.github_mcp_interface.GitHubMCPInterface[source]
Bases: object
Interface for GitHub MCP operations.
Provides a clean API for components that need to interact with GitHub
through the MCP server, abstracting away the specific tool calls.
-
__init__(mcp_caller)[source]
Initialize the GitHub MCP interface.
- Parameters:
mcp_caller (Callable[..., Any]) β Function to call MCP tools (e.g., from kanban_client)
- Return type:
None
-
async list_commits(owner, repo, since=None, until=None, author=None, path=None, per_page=100)[source]
List commits for a repository.
- Parameters:
owner (str) β Repository owner
repo (str) β Repository name
since (Optional[str]) β Only commits after this date (ISO 8601 format)
until (Optional[str]) β Only commits before this date (ISO 8601 format)
author (Optional[str]) β GitHub username or email
path (Optional[str]) β Only commits touching this path
per_page (int) β Results per page (max 100)
- Returns:
Response with commits list
- Return type:
Dict[str, Any]
-
async search_issues(query, sort=None, order=None, per_page=100)[source]
Search for issues and pull requests.
- Parameters:
query (str) β Search query using GitHubβs search syntax
sort (Optional[str]) β Sort field (comments, reactions, reactions-+1, etc.)
order (Optional[str]) β Sort order (asc or desc)
per_page (int) β Results per page (max 100)
- Returns:
Response with items list
- Return type:
Dict[str, Any]
-
async list_pr_reviews(owner, repo, pr_number, per_page=100)[source]
List reviews for a pull request.
- Parameters:
owner (str) β Repository owner
repo (str) β Repository name
pr_number (int) β Pull request number
per_page (int) β Results per page (max 100)
- Returns:
Response with reviews list
- Return type:
Dict[str, Any]
-
async get_repository_content(owner, repo, path='', ref=None)[source]
Get repository content at a specific path.
- Parameters:
owner (str) β Repository owner
repo (str) β Repository name
path (str) β Path to file or directory
ref (Optional[str]) β Branch, tag, or commit SHA
- Returns:
Response with content data
- Return type:
Dict[str, Any]
-
async get_pull_request(owner, repo, pr_number)[source]
Get a specific pull request.
- Parameters:
owner (str) β Repository owner
repo (str) β Repository name
pr_number (int) β Pull request number
- Returns:
Pull request data
- Return type:
Dict[str, Any]
-
async list_pr_commits(owner, repo, pr_number, per_page=100)[source]
List commits for a pull request.
- Parameters:
owner (str) β Repository owner
repo (str) β Repository name
pr_number (int) β Pull request number
per_page (int) β Results per page (max 100)
- Returns:
Response with commits list
- Return type:
Dict[str, Any]
-
async get_repository_stats(owner, repo)[source]
Get repository statistics.
- Parameters:
-
- Returns:
Repository statistics
- Return type:
Dict[str, Any]