ReviewChangeRequest - Review a merge request
Review a merge request using OpenAPI.
|
Applicable editions |
Central edition, Region edition |
Service endpoints and authorization information
- Obtain the service endpoint: Replace {domain} in the API request syntax.
- Obtain a personal access token.
- Obtain the organization ID: Required only for the Central edition. Go to the Basic Information page in the Organization Management console.
|
Product |
Resource |
Required permission |
|
Code Management |
Merge request |
Read and write |
Request syntax
Central edition
POST https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}/changeRequests/{localId}/review
Region edition
POST https://{domain}/oapi/v1/codeup/repositories/{repositoryId}/changeRequests/{localId}/review
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 local ID. |
1 |
| - |
object |
body |
No |
|
|
| reviewComment |
string |
body |
No |
The comment text. |
change request comment content |
| reviewOpinion |
string |
body |
No |
The review result. Valid values: PASS or NOT_PASS. |
PASS |
| submitDraftCommentIds |
array[string] |
body |
No |
The list of draft comment IDs to submit. |
["4ff23jj62c795xxxb468af8"] |
Request examples
Central edition
curl -X 'POST' \
'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1/review' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"reviewComment": "change request comment content",
"reviewOpinion": "PASS",
"submitDraftCommentIds": ["4ff23jj62c795xxxb468af8"]
}'
Region edition
curl -X 'POST' \
'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo/changeRequests/1/review' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
--data '
{
"reviewComment": "change request comment content",
"reviewOpinion": "PASS",
"submitDraftCommentIds": ["4ff23jj62c795xxxb468af8"]
}'
Response parameters
|
Parameter |
Type |
Description |
Example value |
| - |
object |
|
|
| result |
boolean |
Indicates whether the operation succeeded. |
true |
Response example
{
"result": true
}
Error codes
For more information, see Error code center.