Reply to MR review comments.
Function
Reply to MR review comments.
URI
POST /v2/repositories/{repository_id}/merge_requests/{merge_request_iid}/discussions/{discussion_id}/notes
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
repository_id |
Yes |
Integer |
Warehouse Short ID Minimum: 1 Maximum: 2147483647 |
merge_request_iid |
Yes |
Integer |
ID of the combination request. Minimum: 1 Maximum: 2147483647 |
discussion_id |
Yes |
String |
Identifies a comment. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. Can be obtained by calling the IAM API for obtaining the user token (the value of X-Subject-Token in the response header). |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
body |
Yes |
String |
Review Comments |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
error |
Error object |
Response error. |
result |
NoteDto object |
Response |
status |
String |
Response status |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
note id Minimum: 1 Maximum: 2147483647 |
type |
String |
Note Type |
body |
String |
Review Comments |
attachment |
String |
Attachment |
author |
UserBasicDto object |
Author |
created_at |
String |
Created |
updated_at |
String |
Updated |
system |
Boolean |
Indicates whether the log is generated by the system. |
noteable_id |
Integer |
Target ID Minimum: 1 Maximum: 2147483647 |
noteable_type |
String |
Destination Type |
commit_id |
String |
Associated submission ID. |
resolvable |
Boolean |
Whether the Problem Can Be Solved |
is_reply |
Boolean |
Indicates whether to reply. |
resolved_by |
UserBasicDto object |
Solution providing person |
noteable_iid |
Integer |
Target iid Minimum: 1 Maximum: 2147483647 |
discussion_id |
String |
Discussion ID |
project |
String |
Project |
diff_file |
String |
Modified Files |
diff |
String |
Change Description |
archived |
Boolean |
Archived or Not |
review_categories |
String |
Classification of Review Comments |
review_categories_cn |
String |
Review Comment Category (Zh) |
review_categories_en |
String |
Review Comment Category (En) |
review_modules |
String |
Review Comment Module |
severity |
String |
Severity |
severity_cn |
String |
Severity (Zh) |
severity_en |
String |
Severity (En) |
file_path |
String |
File Path |
line |
String |
Line number |
assignee |
UserBasicDto object |
Assigned By |
proposer |
UserBasicDto object |
Raised By |
position |
PositionDto object |
Associated Code Location |
resolved |
Boolean |
Resolved or Not |
is_outdated |
Boolean |
Outdated or Not |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
Specifies the user ID. Minimum: 1 Maximum: 2147483647 |
name |
String |
Name |
username |
String |
User Name |
state |
String |
Status |
avatar_url |
String |
Avatar URL. |
avatar_path |
String |
Profile picture path. |
|
String |
|
name_cn |
String |
Name |
web_url |
String |
Home Page |
nick_name |
String |
MAILNICKNAME |
tenant_name |
String |
Tenant name. |
Parameter |
Type |
Description |
---|---|---|
base_sha |
String |
Base submission node of the source branch |
start_sha |
String |
Latest submission node of the target branch |
head_sha |
String |
Latest Submission Node of Source Branch |
old_path |
String |
File Path Before Modification |
new_path |
String |
File Path After Modification |
position_type |
String |
Change Type |
old_line |
Integer |
Line No. Before Modification |
new_line |
Integer |
Line No. After Modification |
Example Requests
POST https://{endpoint}/v2/repositories/{repository_id}/merge_requests/{merge_request_iid}/discussions/{discussion_id}/notes { "body" : "Reply content" }
Example Responses
Status code: 200
OK
{ "result" : { "id" : 2111886200, "type" : "DiffNote", "body" : "Review Comments", "author" : { "id" : 1234, "name" : "beta", "username" : "c369c68f1ff84679b5a8ed904d8bff1c", "state" : "active", "name_cn" : "beta" }, "created_at" : "2023-06-01T17:05:12.000+08:00", "updated_at" : "2023-06-01T17:05:12.000+08:00", "system" : false, "noteable_id" : 19387, "noteable_type" : "MergeRequest", "resolvable" : true, "is_reply" : true, "noteable_iid" : 2, "discussion_id" : "8bbe6d4e797169c4c1ce56507fdf1abc11f95601", "project" : "DevOpsqlcylxm00004/project-test", "diff_file" : "7", "diff" : "@@ -0,0 +1,0 @@\n+7\n", "archived" : false, "review_categories" : "regulations", "review_categories_cn" : "Programming Regulations", "review_categories_en" : "Regulations", "review_modules" : "aaa,bbb", "severity" : "suggestion", "severity_cn" : "Suggestions", "severity_en" : "Suggestion", "assignee" : { "id" : 1234, "name" : "beta", "username" : "c369c68f1ff84679b5a8ed904d8bff1c", "state" : "active", "name_cn" : "beta" }, "proposer" : { "id" : 1234, "name" : "beta", "username" : "c369c68f1ff84679b5a8ed904d8bff1c", "state" : "active", "name_cn" : "beta" }, "position" : { "base_sha" : "973bcc0211c32dbaa8473561c6767f74e1a81471", "start_sha" : "973bcc0211c32dbaa8473561c6767f74e1a81471", "head_sha" : "f5bf0230f9b996ed6c0d64d2b2fef789d91b164c", "old_path" : "7", "new_path" : "7", "position_type" : "text", "new_line" : 1 }, "resolved" : false, "is_outdated" : false }, "status" : "success" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
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.