Skip to content

Import epic discussions during Bulk Import

George Koltsov requested to merge georgekoltsov/import-epic-comments into master

What does this MR do?

This MR:

  1. Adds Epic discussions migration when using GitLab Migration tool that ~"group::import" is working on (https://docs.gitlab.com/ee/user/group/import/)
  2. Adds RestExtractor similar to GraphqlExtractor to be able to fetch data using GitLab's REST API (reasons why below)

A few remarks on scope of the MR:

  1. System notes are currently skipped and will be added in the future MR
  2. All notes are currently authored by importer user. Reason: discussions API does not expose 'public email' param so we can't associate the group members correctly. User association will be done in the follow up.
  3. Reason for using REST instead of GraphQL: GraphQL API currently allows fetching epic's discussions, but because discussions contain a collection of notes, we end up with nested pagination (having 1 cursor for discussions and X cursors for notes inside of each discussion). Handling nested pagination would add a significant amount of complexity and using REST API was a more straightforward approach.
  4. Adding an ability to fetch individual discussions (by discussion id, similar to https://docs.gitlab.com/ee/api/discussions.html#get-single-epic-discussion-item) to GraphQL API would be ideal and is something ~"group::import" team can work on in a follow up as well.

Screenshots (strongly suggested)

epicdiscussions

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by George Koltsov

Merge request reports

Loading