get_branch_diffs
Compare two GitLab branches or commits and retrieve their file diffs. Use to inspect changes between revisions, with optional filtering by file patterns.
Instructions
Get diffs between two branches or commits. Use this for a known resource or result; choose the corresponding list or search tool when you need to discover multiple resources. It is read-only and does not mutate GitLab data; missing resources, invalid identifiers, insufficient permission, and rate limits are returned as errors. When project_id or group_id is accepted, provide the numeric ID or complete URL-encoded path described by the schema; use required identifiers and pagination fields exactly as documented.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | The target branch or commit SHA to compare to | |
| from | Yes | The base branch or commit SHA to compare from | |
| jmespath | No | Optional JMESPath expression filtering the JSON result before return. | |
| straight | No | Comparison method: false for '...' (default), true for '--' | |
| project_id | Yes | Project ID or complete URL-encoded path to project | |
| 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: ["^vendor/", "^test/mocks/", "\.spec\.ts$", "package-lock\.json"] |