get_branch_diffs
Compare changes between branches or commits in a GitLab project to review code modifications, identify differences, and manage merge conflicts.
Instructions
Get the changes/diffs between two branches or commits in a GitLab project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| from | Yes | The base branch or commit SHA to compare from | |
| to | Yes | The target branch or commit SHA to compare to | |
| straight | No | Comparison method: false for '...' (default), true for '--' | |
| excluded_file_patterns | No | Array of regex patterns to exclude files from the diff results. Each pattern is a JavaScript-compatible regular expression that matches file paths to ignore. Examples: ["^test/mocks/", "\.spec\.ts$", "package-lock\.json"] |
Input Schema (JSON Schema)
{
"properties": {
"excluded_file_patterns": {
"description": "Array of regex patterns to exclude files from the diff results. Each pattern is a JavaScript-compatible regular expression that matches file paths to ignore. Examples: [\"^test/mocks/\", \"\\.spec\\.ts$\", \"package-lock\\.json\"]",
"items": {
"type": "string"
},
"type": "array"
},
"from": {
"description": "The base branch or commit SHA to compare from",
"type": "string"
},
"project_id": {
"description": "Project ID or complete URL-encoded path to project",
"type": "string"
},
"straight": {
"description": "Comparison method: false for '...' (default), true for '--'",
"type": "boolean"
},
"to": {
"description": "The target branch or commit SHA to compare to",
"type": "string"
}
},
"required": [
"project_id",
"from",
"to"
],
"type": "object"
}