PatchsetDiff
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/changes/{id}/patchsets/{patchset_number}/diff/{fingerprint} |
load |
One patchset and its stored file diffs |
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:
patchset_diff, err := client.PatchsetDiff(nil).Load(map[string]any{"change_id": "example", "id": "example_id", "organization_id": "example", "patchset_id": "example", "repo_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(patchset_diff)
Lua
Construct client as shown in the Lua setup, then call the operations:
local patchset_diff, err = client:PatchsetDiff():load({ change_id = "example", id = "example_id", organization_id = "example", patchset_id = "example", repo_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$patchset_diff = $client->PatchsetDiff()->load(["change_id" => "example", "id" => "example_id", "organization_id" => "example", "patchset_id" => "example", "repo_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
patchset_diff = client.PatchsetDiff().load({"change_id": "example", "id": "example_id", "organization_id": "example", "patchset_id": "example", "repo_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
patchset_diff = client.PatchsetDiff.load({ "change_id" => "example", "id" => "example_id", "organization_id" => "example", "patchset_id" => "example", "repo_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const patchset_diff = await client.PatchsetDiff().load({ change_id: "example", id: "example_id", organization_id: "example", patchset_id: "example", repo_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
files |
array |
Yes | Files |
id |
string |
No | Id |
patchset |
object |
Yes | Patchset |
load
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/patchsets/{patchset_number}/diff/{fingerprint}
Operation ID: api_v1_org_repo_change_patchset_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 | |
patchset_number |
path |
string |
Yes | |
fingerprint |
path |
string |
Yes |
Responses
200: One patchset and its stored file diffs
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 | |
patchset |
object |
Yes | |
patchset.base_commit_id |
string |
No | |
patchset.commit_id |
string |
Yes | |
patchset.id |
string |
Yes | |
patchset.number |
integer |
Yes | |
patchset.parent_commit_id |
string |
No |
401: Unauthorized
403: Forbidden
404: The change or the patchset number does not exist
application/json
| Property | Type | Required | Description |
|---|---|---|---|
error |
string |
Yes |