get_diff
Retrieve code differences for a Bitbucket pull request to review added, removed, or modified lines. Understand change scope and analyze impact before merging.
Instructions
Retrieve the code differences (diff) for a pull request showing what lines were added, removed, or modified. Use this to understand the scope of changes, review specific code modifications, or analyze the impact of proposed changes before merging.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Bitbucket project key. If omitted, uses BITBUCKET_DEFAULT_PROJECT environment variable. | |
| repository | Yes | Repository slug containing the pull request. | |
| prId | Yes | Pull request ID to get diff for. | |
| contextLines | No | Number of context lines to show around changes (default: 10). Higher values provide more surrounding code context. | |
| maxLinesPerFile | No | Maximum number of lines to show per file (default: uses BITBUCKET_DIFF_MAX_LINES_PER_FILE env var). Set to 0 for no limit. Prevents large files from overwhelming the diff output. |