Convert `.from_json_hash` into alias of `.from_api_response` GitHub importer representations
What does this MR do and why?
Convert .from_json_hash
into alias of .from_api_response
in Representation classes where it is possible (when GitHub response and representation hash has the same key name/structure).
- lib/gitlab/github_import/representation/collaborator.rb
- lib/gitlab/github_import/representation/user.rb
Other clases have an extra logic in .from_json_hash
or accept objects instead of hashes in .from_api_response
(like lib/gitlab/github_import/representation/note_text.rb
and lib/gitlab/github_import/representation/lfs_object.rb
)
Corresponding issue Convert `.from_json_hash` into alias of `.from_... (#382574 - closed)
How to set up and validate locally
- Run an import of project that have some collaborators there shouldn't be any errors
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 Kristina Doskich