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:

  1. 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".
  2. When the note is not the first note, it goes to updateOrCreateNotes and commit(types.ADD_NEW_NOTE, note); instead of commit(types.ADD_NEW_REPLY_TO_DISCUSSION, note);. This causes the new reply to not show up.
Assignee Loading
Time tracking Loading