PoC: Fix GH imported diff notes that aren't loading
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
How to set up and validate locally
- Pull this MR's branch.
- Import a GH project with PR with comments (on outdated diff, on non-outdated diff, not on diff).
- Check the imported MR.
Related to #340330 (closed)