merge_pull_request
Merge approved pull requests into target branches using specified strategies like merge-commit, squash, or fast-forward to integrate reviewed code changes.
Instructions
Merge an approved pull request into the target branch. Use this when a PR has been reviewed, approved, and is ready to be integrated. Choose the appropriate merge strategy based on your team's workflow and repository history preferences.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repository": "<repository>",
"prId": "<prId>"
},
"name": "merge_pull_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prId | Yes | Pull request ID to merge. | |
| message | No | Custom merge commit message. If not provided, uses default merge message format. | |
| project | No | Bitbucket project key. If omitted, uses BITBUCKET_DEFAULT_PROJECT environment variable. | |
| strategy | No | Merge strategy: "merge-commit" creates a merge commit preserving branch history, "squash" combines all commits into one, "fast-forward" moves the branch pointer without creating a merge commit. | |
| repository | Yes | Repository slug containing the pull request. |