Skip to main content
Glama
lemenkov
by lemenkov

get_pull_request

Retrieve detailed pull request information including comments from Pagure git forges to review changes and manage code contributions.

Instructions

Get detailed information about a specific pull request.

Args: project: Project name pr_id: Pull request ID number namespace: Project namespace (default: rpms)

Returns: JSON string with PR details including comments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
pr_idYes
namespaceNorpms

Implementation Reference

  • Actual implementation of the pull request retrieval logic in the API client.
    async def get_pull_request(
        self,
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> PagurePullRequest:
        """Get pull request details.
    
        Args:
            project: Project name
            pr_id: Pull request ID
            namespace: Project namespace
    
        Returns:
            PagurePullRequest model
        """
        response = await self.client.get(
            f"{self.api_base}/{namespace}/{project}/pull-request/{pr_id}",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        data = response.json()
        return PagurePullRequest(**data)
  • MCP tool registration and wrapper function for get_pull_request.
    async def get_pull_request(
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> str:
        """Get detailed information about a specific pull request.
    
        Args:
            project: Project name
            pr_id: Pull request ID number
            namespace: Project namespace (default: rpms)
    
        Returns:
            JSON string with PR details including comments
        """
        client = get_client()
        result = await client.get_pull_request(project, pr_id, namespace)
    
        return result.model_dump_json(indent=2)

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