Skip to content

PoC: Fix GH imported diff notes that aren't loading

Patrick Bajao requested to merge 340330-fixes-poc into master

What does this MR do and why?

This is a PoC of what was tested to fix the issues mentioned in #340330 (closed).

First commit adds the functionality to add a discussion_id for each LegacyDiffNote we create. This is so we can expand the outdated diff thread without failing. Utilizes the existing Discussion.discussion_id(note) method as it seems that Gitlab::GithubImport::Representation::DiffNote responds to the method it uses.

Second commit uses the original_commit_id we get from GH instead of the commit_id. This way, it shows the accurate commit on the outdated diff.

This is only a PoC MR and isn't meant to be merged.

Screenshots or screen recordings

Screen_Shot_2021-09-08_at_4.30.12_PM

How to set up and validate locally

  1. Pull this MR's branch.
  2. Import a GH project with PR with comments (on outdated diff, on non-outdated diff, not on diff).
  3. Check the imported MR.

Related to #340330 (closed)

Merge request reports

Loading