merge_pull_request
Merge a pull request in Bitbucket by specifying workspace, repository, and pull request ID to complete code integration.
Instructions
Merge a pull request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | The workspace slug | |
| repo_slug | Yes | The repository slug | |
| pr_id | Yes | The pull request ID |
Implementation Reference
- src/BitbucketClient.ts:167-169 (handler)The actual implementation of the pull request merge operation calling the Bitbucket API.
async mergePullRequest(workspace: string, repoSlug: string, prId: number): Promise<void> { await this.api.post(`/repositories/${workspace}/${repoSlug}/pullrequests/${prId}/merge`); } - src/index.ts:226-245 (registration)Registration of the merge_pull_request tool with its input schema.
name: 'merge_pull_request', description: 'Merge a pull request', inputSchema: { type: 'object', properties: { workspace: { type: 'string', description: 'The workspace slug', }, repo_slug: { type: 'string', description: 'The repository slug', }, pr_id: { type: 'number', description: 'The pull request ID', }, }, required: ['workspace', 'repo_slug', 'pr_id'], }, - src/index.ts:546-560 (handler)The tool handler switch case block that invokes the BitbucketClient method.
case 'merge_pull_request': { const { workspace, repo_slug, pr_id } = args as { workspace: string; repo_slug: string; pr_id: number; }; await client.mergePullRequest(workspace, repo_slug, pr_id); return { content: [ { type: 'text', text: `Pull request #${pr_id} merged successfully`, }, ], };