Skip to main content
Glama
lemenkov
by lemenkov

merge_pull_request

Merge approved pull requests in Pagure git forges to integrate changes into projects. Specify project, pull request ID, and optional namespace to complete merges.

Instructions

Merge an approved pull request.

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

Returns: JSON string with merge result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYes
pr_idYes
namespaceNorpms

Implementation Reference

  • The core implementation of the merge_pull_request method that makes the API request to the Pagure server.
    async def merge_pull_request(
        self,
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> Dict[str, Any]:
        """Merge a pull request.
    
        Args:
            project: Project name
            pr_id: Pull request ID
            namespace: Project namespace
    
        Returns:
            Merge result
        """
        response = await self.client.post(
            f"{self.api_base}/{namespace}/{project}/pull-request/{pr_id}/merge",
            headers=self._get_headers(),
        )
        response.raise_for_status()
        return response.json()
  • The wrapper function for the merge_pull_request tool that calls the client's merge_pull_request method.
    async def merge_pull_request(
        project: str,
        pr_id: int,
        namespace: str = "rpms",
    ) -> str:
        """Merge an approved pull request.
    
        Args:
            project: Project name
            pr_id: Pull request ID number to merge
            namespace: Project namespace (default: rpms)
    
        Returns:
            JSON string with merge result
        """
        client = get_client()
        result = await client.merge_pull_request(project, pr_id, namespace)
    
        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