• Nick Thomas's avatar
    Don't refresh all discussions for a new note on a diff · 3f2ab0cb
    Nick Thomas authored
    The `notes.json` endpoint doesn't return sufficient information to
    build a functional discussion for a diff note, so we don't bother
    at the moment, instead pulling anew from `discussions.json`. However,
    this is quite expensive, and we're hoping to replace `discussions.json`
    with `notes.json` entirely in the future, so we're going to need it to
    support these attributes.
    
    Including information about the diff makes `notes.json` a little more
    expensive, but it's a paginatable endpoint with incremental updates,
    whereas `discussions.json` is not paginatable and always returns all
    notes for a given noteable, so this seems like an uncontroversial win.
    3f2ab0cb
note_entity.rb 2.95 KB