GithubImport: Enable users to import _modern_ diff notes
What does this MR do and why?
To enable users to import modern diff notes features, like
suggestions, the diff note must be created with DiffNote
model,
instead of LegacyDiffNote
.
This commit enables the GithubImporter to use DiffNotes
when the
:github_importer_replace_legacy_diffnote
feature flag is enabled.
With the intent to get better performance, and given that Github doesn't
support quick_actions
, the quick actions parsing is disabled for notes
created by the importer.
Related to: #340624 (closed)
Screenshots or screen recordings
Github (original) | Gitlab (imported) |
---|---|
TODO
-
Add a rollout issue for the feature flag (!71765 (comment 706260482)) -
Handle diff position when the diff is on a removed line - Add code/tests for this scenario (!71765 (comment 706260511)) -
Add multiline suggestions specs (!71765 (comment 706260577)) -
Replace comment on app/services/notes/create_service.rb:57
by a test (!71765 (comment 706658317)) -
Add a method for lib/gitlab/github_import/importer/diff_note_importer.rb:19
(!71765 (comment 706658321)) -
Add the reason why importing DiffNote
is slower thanLegacyDiffNote
onlib/gitlab/github_import/importer/diff_note_importer.rb:22
(!71765 (comment 706658331)) -
Make SuggestionFormatter
return an object instead of tuple (!71765 (comment 706658334))
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