Authorization: Bearer ********************
curl --location --request GET 'http://dev-cn.your-api-server.com/api/v1///compare.json?from&to' \
--header 'Cookie: autologin_trustie=3acc38c27d61a347f5c16fbca2c4964b181a2f79'
{
"commits_count": 1,
"last_commit_sha": null,
"commits": [
{
"author": {
"id": "110",
"login": "yystopf",
"name": "咸蛋黄土豆丝xxx",
"type": "User",
"image_url": "system/lets/letter_avatars/2/X/230_139_26/120.png"
},
"committer": {
"id": "110",
"login": "yystopf",
"name": "咸蛋黄土豆丝xxx",
"type": "User",
"image_url": "system/lets/letter_avatars/2/X/230_139_26/120.png"
},
"branch": null,
"commit_message": "测试提交\n",
"sha": "88801266695966b11fcd95ba2bcefad56750d1d9",
"parent_shas": null
}
],
"diff": {
"file_nums": 1,
"total_addition": 1,
"total_deletion": 0,
"files": [
{
"name": "heihei7",
"oldname": "heihei7",
"addition": 1,
"deletion": 0,
"type": 1,
"is_created": true,
"is_deleted": false,
"is_bin": false,
"is_lfs_file": false,
"is_renamed": false,
"is_ambiguous": false,
"is_submodule": false,
"diff": null,
"sections": [
{
"file_name": "heihei7",
"name": "",
"lines": [
{
"left_index": 0,
"right_index": 0,
"match": 0,
"type": 4,
"content": "@@ -0,0 +1 @@",
"section_path": "heihei7",
"section_last_left_index": 0,
"section_last_right_index": 0,
"section_left_index": 0,
"section_right_index": 1,
"section_left_hunk_size": 0,
"section_right_hunk_size": 0
},
{
"left_index": 0,
"right_index": 1,
"match": -1,
"type": 2,
"content": "+jfksj"
}
]
}
],
"is_incomplete": false,
"is_incomplete_line_too_long": false,
"is_protected": false
}
]
}
}