Obtaining Review Settings
Description
This API is used to obtain review settings.
URI
GET /v2/repositories/{repository_id}/review_setting
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
repository_id |
Yes |
Integer |
Repository short ID Minimum value: 1 Maximum value: 2,147,483,647 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
Error object |
Response error |
|
result |
ReviewSettingDto object |
Response result |
|
status |
String |
Response status |
|
Parameter |
Type |
Description |
|---|---|---|
|
categories_and_modules_enabled |
Boolean |
Whether to enable the review category and module |
|
secondary_category_enabled |
Boolean |
Whether to enable level-2 category |
|
forbidden_add_to_issue |
Boolean |
Whether to forbid issue association |
|
primary_categories |
Array of CategoryDto objects |
Level-1 category Array length: 0–100 |
|
review_default_categories |
Array of strings |
Default catalog Array length: 0–100 |
|
review_customized_categories |
Array of strings |
Custom category Array length: 0–100 |
|
review_modules |
Array of strings |
Review module Array length: 0–100 |
|
source_id |
Integer |
Target ID Minimum value: 1 Maximum value: 2,147,483,647 |
|
source_type |
String |
Object type |
|
source_path |
String |
Object path |
|
secondary_category_type |
String |
Level-2 category type |
|
secondary_categories |
Array of CategoryDto objects |
Level-2 category |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Key |
|
name_zh |
String |
Name in Chinese |
|
name_en |
String |
Name |
|
sub_categories |
Array of CategoryDto objects |
Level-2 category Array length: 0–100 |
Request Examples
GET https://{endpoint}/v2/repositories/{repository_id}/review_setting
{
"body" : "Review title",
"review_categories" : "",
"review_modules" : "",
"severity" : "suggestion",
"assignee_id" : 9124
}
Response Examples
Status code: 200
Request succeeded
{
"result" : {
"categories_and_modules_enabled" : true,
"secondary_category_enabled" : false,
"primary_categories" : [ {
"key" : "design",
"name_zh" : "Code design",
"name_en" : "Code design"
}, {
"key" : "regulations",
"name_zh" : "Programming regulations",
"name_en" : "Programming guideline"
} ],
"review_default_categories" : [ "design", "regulations" ],
"review_customized_categories" : [ "xxx", "yyy" ],
"review_modules" : [ "aaa", "bbb", "ccc" ],
"source_id" : 2111699786,
"source_type" : "Project",
"source_path" : "DevOpsqlcylxm00004/project-test"
},
"status" : "success"
}
Status Codes
|
Status Codes |
Description |
|---|---|
|
200 |
Request succeeded |
Error codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot