Read one commit
get_commitRead one GitLab commit: its sha, parents, author and committer dates, full message, and the changed files with git status letters and line counts. Optionally append the unified diff.
Instructions
Read one commit — its sha, parents, author and committer with dates, and full message — then the files it changed with git's status letter (A, M, D, R091 old -> new) and their line counts, or binary. rev accepts a full or abbreviated sha, or a branch or tag. patch: true appends the unified diff, capped by max_bytes. A merge commit reports merge="true" and no file list, because git shows no diff for a merge by default: compare a parent with the commit to see what it brought in. The result states the commit it resolved rev to and synced_at. Give either url — a GitLab /-/commit/<sha> link — or rev; the link's host must be GITLAB_HOST.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rev | No | The commit to read: a full or abbreviated sha, or a branch or tag name that resolves to one. Required unless `url` is given. | |
| url | No | A GitLab commit link, e.g. 'https://gitlab.example.com/group/repo/-/commit/8297d0da'. Replaces rev; the host must be GITLAB_HOST. | |
| patch | No | Append the commit's unified diff. Default false: metadata and the file list only. | |
| project | No | GitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT. | |
| max_bytes | No | Byte cap for the patch when `patch` is set (default 200000). A cut patch is marked in the result. |