GithubImporter: Expose import stats on import status endpoint
What does this MR do and why?
When checking the import status for a github import project, now the user will be able to see the import current stats, like:
{
"id": 27,
"description": null,
"name": "gh_30086",
"name_with_namespace": "Administrator / gh_30086",
"path": "gh_30086",
"path_with_namespace": "root/gh_30086",
"created_at": "2021-12-07T17:45:44.870Z",
"import_status": "finished",
"import_type": "github",
"correlation_id": "01FPB00M3VX3SGVQYGBPBY6QCH",
"failed_relations": [],
"import_error": null,
"stats": { // <=== This is the new field
"fetched": {
"diff_note": 19,
"issue": 3,
"label": 1,
"note": 3,
"pull_request": 2,
"pull_request_merged_by": 1,
"pull_request_review": 16
},
"imported": {
"diff_note": 19,
"issue": 3,
"label": 1,
"note": 3,
"pull_request": 2,
"pull_request_merged_by": 1,
"pull_request_review": 16
}
}
}
Related to: #347433 (closed)
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Kassio Borges