Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.
Obtaining Review Settings
Function
This API is used to obtain review settings.
URI
GET /v2/repositories/{repository_id}/review_setting
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_id |
Yes |
Integer |
Explanation: Repository ID. Constraints: Mandatory Range: Minimum value: 1 Maximum value: 2147483647 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token. It can be obtained by calling the corresponding IAM API. The value of X-Subject-Token in the response header is the user token. Constraints: Mandatory Range: 1–100,000 characters. Default value: None |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Explanation: Response error code. |
result |
ReviewSettingDto object |
Explanation: Review comment information. Range: None |
status |
String |
Explanation: Response status. Range:
|
Parameter |
Type |
Description |
---|---|---|
code |
String |
Explanation: Error code returned when the API fails to be called. Range:
|
message |
String |
Explanation: Error message returned when the API fails to be called. Range:
|
Parameter |
Type |
Description |
---|---|---|
categories_and_modules_enabled |
Boolean |
Explanation: Whether to enable review comment types and modules. Range:
|
secondary_category_enabled |
Boolean |
Explanation: Whether to enable preset review comment types. Range:
|
primary_categories |
Array of CategoryDto objects |
Explanation: Selected types. Range: None |
review_default_categories |
Array of strings |
Explanation: Keys of selected types. Range: None |
review_customized_categories |
Array of strings |
Explanation: Custom types. Range: Max.: 20. Max. length each: 200 characters. Characters: Unicode \u0000 to \uffff. Special characters, such as emojis and uncommon characters, are not supported. Blank: The value cannot be null, an empty string, or only spaces. |
review_modules |
Array of strings |
Explanation: Review comment module. Range: Max.: 20. Ma. length each: 200 characters. Characters: Unicode \u0000 to \uffff. Special characters, such as emojis and uncommon characters, are not supported. Blank: The value cannot be null, an empty string, or only spaces. |
source_id |
Integer |
Explanation: Repository ID. Range: Minimum value: 1 Maximum value: 2147483647 |
source_type |
String |
Explanation: Project type. Currently, only one project type is supported. Range:
|
source_path |
String |
Explanation: Repository path. Range: None |
secondary_category_type |
String |
Explanation: Preset review comment type (discarded field). Range: HiCode |
secondary_categories |
Array of CategoryDto objects |
Explanation: Preset review comment. Range: None |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Explanation: Key of a preset review comment type. Range: None |
name_zh |
String |
Explanation: Name of a preset review comment type in Chinese. Range: None |
name_en |
String |
Explanation: Name of a preset review comment type in English. Range: None |
sub_categories |
Array of CategoryDto objects |
Explanation: Subtype of a preset review comment type. Range: None |
Example Requests
GET https://{endpoint}/v2/repositories/{repository_id}/review_setting
Example Responses
Status code: 200
OK
{ "result": { "categories_and_modules_enabled": true, "secondary_category_enabled": false, "primary_categories": [ { "key": "realize", "name_zh": "Algorithm", "name_en": "Algorithm" } ], "review_default_categories": [ "realize" ], "review_customized_categories": [ "Type" ], "review_modules": [ "Module" ], "source_id": 2111704470, "source_type": "Project", "source_path": "sll_test00006/mr_test" }, "status": "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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