API

ChangeComment

Operations

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

Method Route SDK operation Returns
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments/{comment_id}/resolve create Change comment threads
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments/{comment_id}/unresolve create Change comment threads
POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments create Success
GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments load Change comment threads

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:

change_comment, err := client.ChangeComment(nil).Load(map[string]any{"change_id": "example", "organization_id": "example", "repo_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(change_comment)
created, err := client.ChangeComment(nil).Create(map[string]any{"change_id": "example", "organization_id": "example", "repo_id": "example", "body": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

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

local change_comment, err = client:ChangeComment():load({ change_id = "example", organization_id = "example", repo_id = "example" })
local created, err = client:ChangeComment():create({ change_id = "example", organization_id = "example", repo_id = "example", body = "example" })

PHP

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

$change_comment = $client->ChangeComment()->load(["change_id" => "example", "organization_id" => "example", "repo_id" => "example"]);
$created = $client->ChangeComment()->create(["change_id" => "example", "organization_id" => "example", "repo_id" => "example", "body" => "example"]);

Python

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

change_comment = client.ChangeComment().load({"change_id": "example", "organization_id": "example", "repo_id": "example"})
created = client.ChangeComment().create({ "change_id": "example", "organization_id": "example", "repo_id": "example", "body": "example" })

Ruby

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

change_comment = client.ChangeComment.load({ "change_id" => "example", "organization_id" => "example", "repo_id" => "example" })
created = client.ChangeComment.create({ "change_id" => "example", "organization_id" => "example", "repo_id" => "example", "body" => "example" })

TypeScript

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

const change_comment = await client.ChangeComment().load({ change_id: "example", organization_id: "example", repo_id: "example" })
const created = await client.ChangeComment().create({ change_id: "example", organization_id: "example", repo_id: "example", body: "example" })

Fields

Field Type Required Description
body string Yes Body
comment object No Comment
comments array Yes Comments
id string No Id
kind one,string,null No Kind
line one,integer,null No Line
parent_comment_id one,string,null No Parent Comment Id
patchset_id one,string,null No Patchset Id
path one,string,null No Path
side one,string,null No Side

create

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments/{comment_id}/resolve

Operation ID: post_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_id_comments_comment_id_resolve.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
comment_id path string Yes

Request body

application/json

The request body is object.

Responses

200: Change comment threads

application/json

Property Type Required Description
comment object No
comment.body string Yes
comment.capabilities object Yes
comment.capabilities.can_reopen boolean Yes
comment.capabilities.can_reply boolean Yes
comment.capabilities.can_resolve boolean Yes
comment.change_id string No
comment.created_at string (date-time) No
comment.created_at_label string No
comment.id string Yes
comment.kind string No
comment.line integer No
comment.outdated boolean Yes
comment.parent_comment_id string No
comment.patchset_id string Yes
comment.patchset_number integer Yes
comment.path string No
comment.replies array of object No
comment.resolved boolean Yes
comment.resolved_at string (date-time) No
comment.resolved_at_label string No
comment.resolved_by object No
comment.resolved_by.email string No
comment.resolved_by.id string Yes
comment.resolved_by.name string No
comment.resolved_by.picture_url string No
comment.side enum: additions, deletions No
comment.updated_at string (date-time) No
comment.updated_at_label string No
comment.user object No
comment.user.email string No
comment.user.id string Yes
comment.user.name string No
comment.user.picture_url string No
comments array of object Yes
comments[].body string Yes
comments[].capabilities object Yes
comments[].capabilities.can_reopen boolean Yes
comments[].capabilities.can_reply boolean Yes
comments[].capabilities.can_resolve boolean Yes
comments[].change_id string No
comments[].created_at string (date-time) No
comments[].created_at_label string No
comments[].id string Yes
comments[].kind string No
comments[].line integer No
comments[].outdated boolean Yes
comments[].parent_comment_id string No
comments[].patchset_id string Yes
comments[].patchset_number integer Yes
comments[].path string No
comments[].replies array of object No
comments[].resolved boolean Yes
comments[].resolved_at string (date-time) No
comments[].resolved_at_label string No
comments[].resolved_by object No
comments[].resolved_by.email string No
comments[].resolved_by.id string Yes
comments[].resolved_by.name string No
comments[].resolved_by.picture_url string No
comments[].side enum: additions, deletions No
comments[].updated_at string (date-time) No
comments[].updated_at_label string No
comments[].user object No
comments[].user.email string No
comments[].user.id string Yes
comments[].user.name string No
comments[].user.picture_url string No
401: Unauthorized
403: The actor cannot mutate comments on this change

application/json

Property Type Required Description
error string Yes
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments/{comment_id}/unresolve

Operation ID: post_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_id_comments_comment_id_unresolve.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
comment_id path string Yes

Request body

application/json

The request body is object.

Responses

200: Change comment threads

application/json

Property Type Required Description
comment object No
comment.body string Yes
comment.capabilities object Yes
comment.capabilities.can_reopen boolean Yes
comment.capabilities.can_reply boolean Yes
comment.capabilities.can_resolve boolean Yes
comment.change_id string No
comment.created_at string (date-time) No
comment.created_at_label string No
comment.id string Yes
comment.kind string No
comment.line integer No
comment.outdated boolean Yes
comment.parent_comment_id string No
comment.patchset_id string Yes
comment.patchset_number integer Yes
comment.path string No
comment.replies array of object No
comment.resolved boolean Yes
comment.resolved_at string (date-time) No
comment.resolved_at_label string No
comment.resolved_by object No
comment.resolved_by.email string No
comment.resolved_by.id string Yes
comment.resolved_by.name string No
comment.resolved_by.picture_url string No
comment.side enum: additions, deletions No
comment.updated_at string (date-time) No
comment.updated_at_label string No
comment.user object No
comment.user.email string No
comment.user.id string Yes
comment.user.name string No
comment.user.picture_url string No
comments array of object Yes
comments[].body string Yes
comments[].capabilities object Yes
comments[].capabilities.can_reopen boolean Yes
comments[].capabilities.can_reply boolean Yes
comments[].capabilities.can_resolve boolean Yes
comments[].change_id string No
comments[].created_at string (date-time) No
comments[].created_at_label string No
comments[].id string Yes
comments[].kind string No
comments[].line integer No
comments[].outdated boolean Yes
comments[].parent_comment_id string No
comments[].patchset_id string Yes
comments[].patchset_number integer Yes
comments[].path string No
comments[].replies array of object No
comments[].resolved boolean Yes
comments[].resolved_at string (date-time) No
comments[].resolved_at_label string No
comments[].resolved_by object No
comments[].resolved_by.email string No
comments[].resolved_by.id string Yes
comments[].resolved_by.name string No
comments[].resolved_by.picture_url string No
comments[].side enum: additions, deletions No
comments[].updated_at string (date-time) No
comments[].updated_at_label string No
comments[].user object No
comments[].user.email string No
comments[].user.id string Yes
comments[].user.name string No
comments[].user.picture_url string No
401: Unauthorized
403: The actor cannot mutate comments on this change

application/json

Property Type Required Description
error string Yes
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments

Operation ID: post_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_id_comments.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes

Request body

application/json

Property Type Required Description
body string Yes
kind string No
line integer No
parent_comment_id string No
patchset_id string No
path string No
side enum: additions, deletions No

Responses

200: Success

application/json

The response is object.

201: Created comment and refreshed change comment threads

application/json

Property Type Required Description
comment object No
comment.body string Yes
comment.capabilities object Yes
comment.capabilities.can_reopen boolean Yes
comment.capabilities.can_reply boolean Yes
comment.capabilities.can_resolve boolean Yes
comment.change_id string No
comment.created_at string (date-time) No
comment.created_at_label string No
comment.id string Yes
comment.kind string No
comment.line integer No
comment.outdated boolean Yes
comment.parent_comment_id string No
comment.patchset_id string Yes
comment.patchset_number integer Yes
comment.path string No
comment.replies array of object No
comment.resolved boolean Yes
comment.resolved_at string (date-time) No
comment.resolved_at_label string No
comment.resolved_by object No
comment.resolved_by.email string No
comment.resolved_by.id string Yes
comment.resolved_by.name string No
comment.resolved_by.picture_url string No
comment.side enum: additions, deletions No
comment.updated_at string (date-time) No
comment.updated_at_label string No
comment.user object No
comment.user.email string No
comment.user.id string Yes
comment.user.name string No
comment.user.picture_url string No
comments array of object Yes
comments[].body string Yes
comments[].capabilities object Yes
comments[].capabilities.can_reopen boolean Yes
comments[].capabilities.can_reply boolean Yes
comments[].capabilities.can_resolve boolean Yes
comments[].change_id string No
comments[].created_at string (date-time) No
comments[].created_at_label string No
comments[].id string Yes
comments[].kind string No
comments[].line integer No
comments[].outdated boolean Yes
comments[].parent_comment_id string No
comments[].patchset_id string Yes
comments[].patchset_number integer Yes
comments[].path string No
comments[].replies array of object No
comments[].resolved boolean Yes
comments[].resolved_at string (date-time) No
comments[].resolved_at_label string No
comments[].resolved_by object No
comments[].resolved_by.email string No
comments[].resolved_by.id string Yes
comments[].resolved_by.name string No
comments[].resolved_by.picture_url string No
comments[].side enum: additions, deletions No
comments[].updated_at string (date-time) No
comments[].updated_at_label string No
comments[].user object No
comments[].user.email string No
comments[].user.id string Yes
comments[].user.name string No
comments[].user.picture_url string No
401: Unauthorized
403: The actor cannot mutate comments on this change

application/json

Property Type Required Description
error string Yes
404: Not found
422: Change submission was invalid

application/json

Property Type Required Description
error string Yes
502: Bad gateway

load

GET /api/v1/organizations/{org_slug}/repos/{repo_slug}/vcs/changes/{id}/comments

Operation ID: get_api_v1_organizations_org_slug_repos_repo_slug_vcs_changes_id_comments.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes
repo_slug path string Yes
id path string Yes
path query string No
resolved query boolean No

Responses

200: Change comment threads

application/json

Property Type Required Description
comment object No
comment.body string Yes
comment.capabilities object Yes
comment.capabilities.can_reopen boolean Yes
comment.capabilities.can_reply boolean Yes
comment.capabilities.can_resolve boolean Yes
comment.change_id string No
comment.created_at string (date-time) No
comment.created_at_label string No
comment.id string Yes
comment.kind string No
comment.line integer No
comment.outdated boolean Yes
comment.parent_comment_id string No
comment.patchset_id string Yes
comment.patchset_number integer Yes
comment.path string No
comment.replies array of object No
comment.resolved boolean Yes
comment.resolved_at string (date-time) No
comment.resolved_at_label string No
comment.resolved_by object No
comment.resolved_by.email string No
comment.resolved_by.id string Yes
comment.resolved_by.name string No
comment.resolved_by.picture_url string No
comment.side enum: additions, deletions No
comment.updated_at string (date-time) No
comment.updated_at_label string No
comment.user object No
comment.user.email string No
comment.user.id string Yes
comment.user.name string No
comment.user.picture_url string No
comments array of object Yes
comments[].body string Yes
comments[].capabilities object Yes
comments[].capabilities.can_reopen boolean Yes
comments[].capabilities.can_reply boolean Yes
comments[].capabilities.can_resolve boolean Yes
comments[].change_id string No
comments[].created_at string (date-time) No
comments[].created_at_label string No
comments[].id string Yes
comments[].kind string No
comments[].line integer No
comments[].outdated boolean Yes
comments[].parent_comment_id string No
comments[].patchset_id string Yes
comments[].patchset_number integer Yes
comments[].path string No
comments[].replies array of object No
comments[].resolved boolean Yes
comments[].resolved_at string (date-time) No
comments[].resolved_at_label string No
comments[].resolved_by object No
comments[].resolved_by.email string No
comments[].resolved_by.id string Yes
comments[].resolved_by.name string No
comments[].resolved_by.picture_url string No
comments[].side enum: additions, deletions No
comments[].updated_at string (date-time) No
comments[].updated_at_label string No
comments[].user object No
comments[].user.email string No
comments[].user.id string Yes
comments[].user.name string No
comments[].user.picture_url string No
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway