Skip to main content
Glama
lemenkov
by lemenkov

list_pull_requests

Retrieve pull requests from Pagure projects with filtering by status and pagination controls to manage code review workflows.

Instructions

List pull requests for a Pagure project.

Args: project: Project name namespace: Project namespace (default: rpms) status: PR status - Open, Merged, Closed, or all (default: Open) page: Page number (default: 1) per_page: Results per page (default: 20)

Returns: JSON string with PR list and pagination info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
namespaceNorpms
statusNoOpen
pageNo
per_pageNo

Implementation Reference

  • The API client method that performs the actual network request to list pull requests from the Pagure API.
    async def list_pull_requests(
        self,
        project: str,
        namespace: str = "rpms",
        status: str = "Open",
        page: int = 1,
        per_page: int = 20,
    ) -> Dict[str, Any]:
        """List pull requests.
    
        Args:
            project: Project name
            namespace: Project namespace
            status: PR status (Open, Merged, Closed, all)
            page: Page number
            per_page: Results per page
    
        Returns:
            Dict with PRs and pagination info
        """
        params = {
            "status": status,
            "page": page,
            "per_page": per_page,
        }
    
        response = await self.client.get(
            f"{self.api_base}/{namespace}/{project}/pull-requests",
            params=params,
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()
  • The MCP tool handler registration for list_pull_requests, which invokes the PagureClient method.
    async def list_pull_requests(
        project: str,
        namespace: str = "rpms",
        status: str = "Open",
        page: int = 1,
        per_page: int = 20,
    ) -> str:
        """List pull requests for a Pagure project.
    
        Args:
            project: Project name
            namespace: Project namespace (default: rpms)
            status: PR status - Open, Merged, Closed, or all (default: Open)
            page: Page number (default: 1)
            per_page: Results per page (default: 20)
    
        Returns:
            JSON string with PR list and pagination info
        """
        client = get_client()
        result = await client.list_pull_requests(project, namespace, status, page, per_page)
    
        import json
        return json.dumps(result, 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