Skip to content

Convert `.from_json_hash` into alias of `.from_api_response` GitHub importer representations

Kristina Doskich requested to merge refactore-github-imprt-representations into master

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

  1. 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.

Edited by Kristina Doskich

Merge request reports

Loading