Files Changed

Use Libra Commend to get mr's changed files.

URL:

GET /api/v1/mr/${link}/files-changed

Request Params:

FieldRequiredTypeLocationDescription
linkYstringPathA unique identifier for the merge request to be merged

Response Params:

  1. Common
FieldTypeDescription
contentstringlibra diff string
filesarraychanged files list
  1. files list
FieldTypeDescription
pathstringThe generated MR link
statusstringThe status of changed file
- "new": New added files.
- "modified": Changed files.
- "deleted": Removed files

Request Example:

GET /api/v1/mr/OTLRROOS/files-changed
Content-Type: application/json

Response Example::

{
    "req_result": true,
    "data": {
        "files": [
            {
                "path": "ceres/src/lfs/lfs_structs.rs",
                "status": "new"
            },
        ],
        "content": "diff --git a/ceres/src/lfs/lfs_structs.rs b/ceres/src/lfs/lfs_structs.rs\nnew file mode 100644\nindex 0000000..4618dc34\n@@ -1,0 +1,205 @@\n+use serde::{Deserialize, Serialize};\n+use std::collections::HashMap;\n+use std::path::PathBuf;\n"
    },
    "err_message": ""
}