UpdateChangeRequestComment – Update a merge request comment
Updates a comment on a merge request.
|
Applicable editions |
Central edition, Region edition |
Endpoint and authorization information
- Obtain the endpoint and replace {domain} in the request syntax.
- Obtain a personal access token.
- Obtain the organization ID. This parameter is required only for the Central edition. Go to the Basic Information page in the Organization Management console to find the organization ID.
|
Product |
Resource |
Required permission |
|
Code Management |
Merge request |
Read and write |
Request syntax
Central edition
PUT https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/changeRequests/{localId}/comments/{commentBizId}
Region edition
PUT https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/changeRequests/{localId}/comments/{commentBizId}
Request headers
|
Parameter |
Type |
Required |
Description |
Example value |
|
x-yunxiao-token |
string |
Yes |
Your personal access token. |
pt-0fh3****0fbG_35af****0484 |
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
Example value |
|
organizationId |
string |
path |
|
The organization ID. |
60d54f3daccf2bbd6659f3ad |
|
repositoryId |
string |
path |
Yes |
The repository ID, or the URL-encoded full path. |
2813489 or 60de7a6852743a5162b5f957%2FDemoRepo |
|
localId |
integer |
path |
Yes |
The sequence number of the merge request in the repository. |
1 |
|
commentBizId |
string |
path |
Yes |
The business ID of the comment. |
bf117304dfe44d5d9b1132f348edf92e |
| - |
object |
body |
No |
|
|
| content |
string |
body |
No |
The comment content. |
your new comment |
| resolved |
boolean |
body |
No |
Specifies whether the comment is resolved. |
false |
Request examples
Central edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/{repository_id_or_path}/changeRequests/1/comments/bf117304dfe44d5d9b1132f348edf92e' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"content": "your new comment",
"resolved": false
}'
Region edition
curl -X 'PUT' \
'https://{domain}/oapi/v1/codeup/repositories/{repository_id_or_path}/changeRequests/1/comments/bf117304dfe44d5d9b1132f348edf92e' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"content": "your new comment",
"resolved": false
}'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
object |
|
|
| result |
boolean |
The execution result. |
true |
Response example
{
"result": true
}
Error codes
For more information, see Error code center.