Polling for MR notes from commits doesn't work properly
When we poll for MR notes and we get a note from a commit, these aren't displayed properly in the frontend. This is due to the fact that we handle these notes differently. These are regular notes but we show these notes in a thread per commit.
There are 2 bugs that happen:
- When the note is the first note on that commit (meaning there's no existing thread for that commit on the MR), the commit note is added as a regular note. This should be a thread that has a header of "commented on commit xxx".
- When the note is not the first note, it goes to
updateOrCreateNotesandcommit(types.ADD_NEW_NOTE, note);instead ofcommit(types.ADD_NEW_REPLY_TO_DISCUSSION, note);. This causes the new reply to not show up.