API

CommitDiff

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/commits/{id}/diff/{fingerprint} load One commit range and its file diff

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

commit_diff, err := client.CommitDiff(nil).Load(map[string]any{"commit_id": "example", "id": "example_id", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(commit_diff)

Lua

Construct client as shown in the Lua setup, then call the operations:

local commit_diff, err = client:CommitDiff():load({ commit_id = "example", id = "example_id", organization_id = "example", repo_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$commit_diff = $client->CommitDiff()->load(["commit_id" => "example", "id" => "example_id", "organization_id" => "example", "repo_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

commit_diff = client.CommitDiff().load({"commit_id": "example", "id": "example_id", "organization_id": "example", "repo_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

commit_diff = client.CommitDiff.load({ "commit_id" => "example", "id" => "example_id", "organization_id" => "example", "repo_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const commit_diff = await client.CommitDiff().load({ commit_id: "example", id: "example_id", organization_id: "example", repo_id: "example" })

Fields

Field Type Required Description
files array Yes Files
id string No Id
parent_id one,string,null Yes Parent Id

load

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/commits/{id}/diff/{fingerprint}

Operation ID: api_v1_org_repo_vcs_commit_range_diff.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
fingerprint path string Yes
parent query string No Override the base commit (defaults to the commit's first parent)

Responses

200: One commit range and its file diff

application/json

Property Type Required Description
files array of object Yes
files[].additions integer Yes
files[].binary boolean No
files[].deletions integer Yes
files[].generated boolean No True when this path is a lockfile or well-known generated dump a reviewer usually does not need expanded.
files[].patch string No
files[].path string Yes
files[].previous_path string No
files[].status enum: added, modified, deleted, renamed Yes
files[].truncated boolean No
files[].unresolved_comments_count integer No
files[].unresolved_comments_count_label string No
parent_id string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway