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
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | ||
| pr_id | Yes | ||
| namespace | No | rpms |
Implementation Reference
- src/pagure/client.py:200-222 (handler)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) - src/pagure/server.py:164-182 (registration)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)