Skip to content

Re-enable legacy diff notes on merge request diffs

Phil Hughes requested to merge mr-legacy-diff-notes into master

What does this MR do?

This updates the logic in the diff store to allow for LegacyDiffNote to be shown on the changes tab. LegacyDiffNotes don't have a position object, instead they only have a line_code string. If the note has the position, then the logic remains the same as previous. If the position object does not exist, then the line codes get compared.

As an extra on top of this, it also re-enables commenting on legacy diffs. Previously we would only send DiffNote as the type to the backend, which for legacy diffs it is incorrect. Instead we now check if it is a legacy diff and then send the correct type (LegacyDiffNote or DiffNote).

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/48873

Does this MR meet the acceptance criteria?

Edited by Filipa Lacerda

Merge request reports