Skip to main content
Glama
lemenkov
by lemenkov

get_commit

Retrieve detailed commit information from Pagure git forges by specifying project, commit hash, and namespace parameters.

Instructions

Get detailed information about a specific commit.

Args: project: Project name commit_hash: Commit hash (full or short) namespace: Project namespace (default: rpms)

Returns: JSON string with commit details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
commit_hashYes
namespaceNorpms

Implementation Reference

  • The MCP tool `get_commit` which serves as the entry point for the tool, calling the underlying Pagure client.
    @mcp.tool()
    async def get_commit(
        project: str,
        commit_hash: str,
        namespace: str = "rpms",
    ) -> str:
        """Get detailed information about a specific commit.
    
        Args:
            project: Project name
            commit_hash: Commit hash (full or short)
            namespace: Project namespace (default: rpms)
    
        Returns:
            JSON string with commit details
        """
        client = get_client()
        result = await client.get_commit(project, commit_hash, namespace)
    
        import json
        return json.dumps(result, indent=2)
  • The underlying PagureClient method that performs the actual API call to retrieve commit information.
    async def get_commit(
        self,
        project: str,
        commit_hash: str,
        namespace: str = "rpms",
    ) -> Dict[str, Any]:
        """Get commit details.
    
        Args:
            project: Project name
            commit_hash: Commit hash
            namespace: Project namespace
    
        Returns:
            Commit details
        """
        response = await self.client.get(
            f"{self.api_base}/{namespace}/{project}/c/{commit_hash}",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lemenkov/mcp-pagure'

If you have feedback or need assistance with the MCP directory API, please join our Discord server