Commit cb8ab3ab authored by Matthias Kaeppler's avatar Matthias Kaeppler

Expose correlation_id in import_status resource

parent 27be1000
......@@ -172,7 +172,8 @@ requests.post(url, headers=headers, data=data, files=files)
"path": "api-project",
"path_with_namespace": "root/api-project",
"created_at": "2018-02-13T09:05:58.023Z",
"import_status": "scheduled"
"import_status": "scheduled",
"correlation_id": "mezklWso3Za"
}
```
......@@ -211,6 +212,7 @@ If the status is `failed`, it will include the import error message under `impor
"path": "gitlab-test",
"path_with_namespace": "gitlab-org/gitlab-test",
"created_at": "2017-08-29T04:36:44.383Z",
"import_status": "started"
"import_status": "started",
"correlation_id": "mezklWso3Za"
}
```
......@@ -4,6 +4,9 @@ module API
module Entities
class ProjectImportStatus < ProjectIdentity
expose :import_status
expose :correlation_id do |project, _options|
project.import_state.correlation_id
end
# TODO: Use `expose_nil` once we upgrade the grape-entity gem
expose :import_error, if: lambda { |project, _ops| project.import_state&.last_error } do |project|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment