Authorization: Bearer ********************
{
"type": "problem",
"note": "测试评论",
"review_id": "10",
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
"commit_id": "70eede447ccc01c1902260fd377af5d90be28e0d",
"path": "Gemfile.lock",
"diff": {
"name": "README.md",
"oldname": "README.md",
"addition": 1,
"deletion": 2,
"type": 2,
"is_created": false,
"is_deleted": false,
"is_bin": false,
"is_lfs_file": false,
"is_renamed": false,
"is_ambiguous": false,
"is_submodule": false,
"sections": [
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": "@@ -1,2 +1 @@",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 0,
"section_left_index": 1,
"section_right_index": 1,
"section_left_hunk_size": 2,
"section_right_hunk_size": 0
},
{
"left_index": 1,
"right_index": 0,
"match": 3,
"type": 3,
"content": "-# ceshi_commit"
},
{
"left_index": 2,
"right_index": 0,
"match": -1,
"type": 3,
"content": "-"
},
{
"left_index": 0,
"right_index": 1,
"match": 1,
"type": 2,
"content": "+adsa"
}
]
},
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": " ",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 1,
"section_left_index": 3,
"section_right_index": 2,
"section_left_hunk_size": 0,
"section_right_hunk_size": 0
}
]
}
],
"is_incomplete": false,
"is_incomplete_line_too_long": false,
"is_protected": false
}
}
curl --location --request POST 'https://testforgeplus.trustie.net/api/v1///pulls//journals.json' \
--header 'Cookie: autologin_trustie=3acc38c27d61a347f5c16fbca2c4964b181a2f79' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "problem",
"note": "测试评论",
"review_id": "10",
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
"commit_id": "70eede447ccc01c1902260fd377af5d90be28e0d",
"path": "Gemfile.lock",
"diff": {
"name": "README.md",
"oldname": "README.md",
"addition": 1,
"deletion": 2,
"type": 2,
"is_created": false,
"is_deleted": false,
"is_bin": false,
"is_lfs_file": false,
"is_renamed": false,
"is_ambiguous": false,
"is_submodule": false,
"sections": [
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": "@@ -1,2 +1 @@",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 0,
"section_left_index": 1,
"section_right_index": 1,
"section_left_hunk_size": 2,
"section_right_hunk_size": 0
},
{
"left_index": 1,
"right_index": 0,
"match": 3,
"type": 3,
"content": "-# ceshi_commit"
},
{
"left_index": 2,
"right_index": 0,
"match": -1,
"type": 3,
"content": "-"
},
{
"left_index": 0,
"right_index": 1,
"match": 1,
"type": 2,
"content": "+adsa"
}
]
},
{
"file_name": "README.md",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": " ",
"section_path": "README.md",
"section_last_left_index": 0,
"section_last_right_index": 1,
"section_left_index": 3,
"section_right_index": 2,
"section_left_hunk_size": 0,
"section_right_hunk_size": 0
}
]
}
],
"is_incomplete": false,
"is_incomplete_line_too_long": false,
"is_protected": false
}
}'
{
"id": 200,
"note": "测试评论修改",
"commit_id": null,
"line_code": "70eede447ccc01c1902260fd377af5d90be28e0d_0_29",
"path": "Gemfile.lock",
"diff": {},
"need_respond": true,
"state": "resolved",
"user": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"review": {
"reviewer": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"pull_request": {
"id": 163,
"title": "新合并请求1",
"body": null,
"head": "master_1",
"base": "master",
"is_original": false,
"index": 1,
"status": "closed",
"issue": {
"id": 260,
"author": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"priority": null,
"version": null,
"journals_count": 0,
"issue_tags": null
},
"reviewers": [],
"journals_count": 9
},
"id": 10,
"commit_id": "1",
"content": "新建一个审查",
"status": "common",
"created_at": "2022-07-26 11:45"
},
"resolveer": {
"id": 2,
"type": "User",
"name": "heh",
"login": "yystopf",
"image_url": "system/lets/letter_avatars/2/H/188_239_142/120.png"
},
"resolve_at": "2022-07-27 14:50",
"created_at": "2022-07-27 14:31",
"updated_at": "2022-07-27 14:50"
}