Fix diff api response conversion for harness compareChange (#269)
* Fix diff api response conversionpull/117/merge
parent
5098db8648
commit
8764ac057e
@ -1,25 +1,53 @@
|
||||
diff --git a/five b/five
|
||||
new file mode 100644
|
||||
index 0000000..54f9d6d
|
||||
--- /dev/null
|
||||
+++ b/five
|
||||
@@ -0,0 +1 @@
|
||||
+five
|
||||
diff --git a/two b/four
|
||||
similarity index 100%
|
||||
rename from two
|
||||
rename to four
|
||||
diff --git a/one b/one
|
||||
index 5626abf..9c0408b 100644
|
||||
--- a/one
|
||||
+++ b/one
|
||||
@@ -1 +1,2 @@
|
||||
one
|
||||
+modified to two
|
||||
diff --git a/three b/three
|
||||
deleted file mode 100644
|
||||
index 2bdf67a..0000000
|
||||
--- a/three
|
||||
+++ /dev/null
|
||||
@@ -1 +0,0 @@
|
||||
-three
|
||||
[
|
||||
{
|
||||
"sha": "c4e897c1fcd1cae04abf761f034ae4c5e210caad",
|
||||
"old_sha": "0000000000000000000000000000000000000000",
|
||||
"path": "hello.go",
|
||||
"old_path": "hello.go",
|
||||
"status": "ADDED",
|
||||
"additions": 8,
|
||||
"deletions": 0,
|
||||
"changes": 8,
|
||||
"content_url": "/api/v1/hello.go",
|
||||
"is_binary": false,
|
||||
"is_submodule": false
|
||||
},
|
||||
{
|
||||
"sha": "0000000000000000000000000000000000000000",
|
||||
"old_sha": "d7fcbf28651697b00add519d8b4402a5ab46ffc2",
|
||||
"path": "null.go",
|
||||
"old_path": "null.go",
|
||||
"status": "DELETED",
|
||||
"additions": 0,
|
||||
"deletions": 118,
|
||||
"changes": 118,
|
||||
"content_url": "/api/v1/null.go",
|
||||
"is_binary": false,
|
||||
"is_submodule": false
|
||||
},
|
||||
{
|
||||
"sha": "ce5a2cd34b697f7a8507192e7074b33737c6740c",
|
||||
"old_sha": "7697802e4d16b255e7ea22a86071cfbe9af6aa39",
|
||||
"path": "version4.go",
|
||||
"old_path": "version4.go",
|
||||
"status": "MODIFIED",
|
||||
"additions": 8,
|
||||
"deletions": 7,
|
||||
"changes": 15,
|
||||
"content_url": "/api/v1/version4.go",
|
||||
"is_binary": false,
|
||||
"is_submodule": false
|
||||
},
|
||||
{
|
||||
"sha": "",
|
||||
"path": "version_1.go",
|
||||
"old_path": "version1.go",
|
||||
"status": "RENAMED",
|
||||
"additions": 0,
|
||||
"deletions": 0,
|
||||
"changes": 0,
|
||||
"content_url": "/api/v1/version_1.go",
|
||||
"is_binary": false,
|
||||
"is_submodule": false
|
||||
}
|
||||
]
|
@ -1,38 +1,38 @@
|
||||
[
|
||||
{
|
||||
"Path": "five",
|
||||
"Path": "hello.go",
|
||||
"Added": true,
|
||||
"Renamed": false,
|
||||
"Deleted": false,
|
||||
"Sha": "",
|
||||
"BlobID": "",
|
||||
"PrevFilePath": ""
|
||||
"PrevFilePath": "hello.go"
|
||||
},
|
||||
{
|
||||
"Path": "four",
|
||||
"Path": "null.go",
|
||||
"Added": false,
|
||||
"Renamed": true,
|
||||
"Deleted": false,
|
||||
"Renamed": false,
|
||||
"Deleted": true,
|
||||
"Sha": "",
|
||||
"BlobID": "",
|
||||
"PrevFilePath": "two"
|
||||
"PrevFilePath": "null.go"
|
||||
},
|
||||
{
|
||||
"Path": "one",
|
||||
"Path": "version4.go",
|
||||
"Added": false,
|
||||
"Renamed": false,
|
||||
"Deleted": false,
|
||||
"Sha": "",
|
||||
"BlobID": "",
|
||||
"PrevFilePath": "one"
|
||||
"PrevFilePath": "version4.go"
|
||||
},
|
||||
{
|
||||
"Path": "",
|
||||
"Path": "version_1.go",
|
||||
"Added": false,
|
||||
"Renamed": false,
|
||||
"Deleted": true,
|
||||
"Renamed": true,
|
||||
"Deleted": false,
|
||||
"Sha": "",
|
||||
"BlobID": "",
|
||||
"PrevFilePath": "three"
|
||||
"PrevFilePath": "version1.go"
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue