Skip to content

Convert to hash Octokit note responses in Github Import

What does this MR do and why?

This merge request is part of a series of changes to convert Octokit returned objects into a hash before using it in the codebase in order to rely less on Sawyer::Resource objects

This change converts Octokit responses into a hash in the module SingleEndpointNotesImporting. This module is used in the importers SingleEndpointDiffNotesImporter, SingleEndpointIssueEventsImporter, SingleEndpointIssueNotesImporter and SingleEndpointMergeRequestNotesImporter. And these importers are only used when the feature flag github_importer_single_endpoint_notes_import is enabled.

Related to: https://gitlab.com/gitlab-org/gitlab/-/issues/372473

Screenshots or screen recordings

DiffNotes

How to set up and validate locally

  1. Enable the feature flag github_importer_single_endpoint_notes_import
  2. Create a Github project
  3. In the project, create issues and merge requests. Add comments and events to the merge request and issues.
  4. In Gitlab, go to projects, new project, import from Github
  5. Select the project and import it
  6. Check if the comments and events were migrated

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 Rodrigo Tomonari

Merge request reports

Loading