get_pull_request_diff
Retrieve and filter pull request diffs by specifying context lines, file paths, or inclusion/exclusion patterns to streamline code review and change analysis.
Instructions
Get the diff/changes for a pull request with optional filtering
Input Schema
Name | Required | Description | Default |
---|---|---|---|
context_lines | No | Number of context lines around changes (optional, default: 3) | |
exclude_patterns | No | Array of glob patterns to exclude (e.g., ["*.lock", "*.svg"]) (optional) | |
file_path | No | Specific file path to get diff for (e.g., "src/index.ts") (optional) | |
include_patterns | No | Array of glob patterns to include (e.g., ["*.res", "src/**/*.js"]) (optional) | |
pull_request_id | Yes | Pull request ID | |
repository | Yes | Repository slug (e.g., "my-repo") | |
workspace | Yes | Bitbucket workspace/project key (e.g., "PROJ") |
Input Schema (JSON Schema)
{
"properties": {
"context_lines": {
"description": "Number of context lines around changes (optional, default: 3)",
"type": "number"
},
"exclude_patterns": {
"description": "Array of glob patterns to exclude (e.g., [\"*.lock\", \"*.svg\"]) (optional)",
"items": {
"type": "string"
},
"type": "array"
},
"file_path": {
"description": "Specific file path to get diff for (e.g., \"src/index.ts\") (optional)",
"type": "string"
},
"include_patterns": {
"description": "Array of glob patterns to include (e.g., [\"*.res\", \"src/**/*.js\"]) (optional)",
"items": {
"type": "string"
},
"type": "array"
},
"pull_request_id": {
"description": "Pull request ID",
"type": "number"
},
"repository": {
"description": "Repository slug (e.g., \"my-repo\")",
"type": "string"
},
"workspace": {
"description": "Bitbucket workspace/project key (e.g., \"PROJ\")",
"type": "string"
}
},
"required": [
"workspace",
"repository",
"pull_request_id"
],
"type": "object"
}